The TCP monitor connects to a specific port on a host to verify that the service behind it is listening and responding.
๐ฏ Was Es Machtโ
- Opens a TCP connection to a host:port
- Optionally sends data after connecting
- Optionally checks for expected data in the response
- Reads the service banner (if any)
- Measures connection time
โ๏ธ Konfigurationโ
| Einstellung | Beschreibung | Beispiel |
|---|
| Name | A friendly name | Redis Production |
| Host / IP | Target hostname or IP | 10.0.0.5 |
| Port | TCP port number | 6379 |
| Send Data | Data to send after connecting | PING\r\n |
| Expect Data | Expected string in response | +PONG |
| Timeout | Connection timeout | 10 seconds |
๐ Anwendungsbeispieleโ
Example 1: Check if a port is openโ
Just verify that port 8080 is accepting connections:
| Einstellung | Wert |
|---|
| Name | App Server Port 8080 |
| Address | app.example.com |
| Port | 8080 |
Example 2: Redis health checkโ
Send a PING command and expect PONG:
| Einstellung | Wert |
|---|
| Name | Redis |
| Address | 10.0.0.5 |
| Port | 6379 |
| Send Data | PING\r\n |
| Expect Data | +PONG |
Example 3: Custom application protocolโ
| Einstellung | Wert |
|---|
| Name | Game Server |
| Address | game.example.com |
| Port | 27015 |
๐ก Tippsโ
- TCP monitors are great for services that don't speak HTTP โ databases, caches, message queues, custom applications.
- If you just need to check if a port is open, leave "Send Data" and "Expect Data" empty.
- For databases, consider using the dedicated MySQL/PostgreSQL/Redis monitors instead, which perform actual protocol checks.