Configure TCP probes
Open a TCP connection and report connect time as the metric value.
TCP probes are appropriate for non-HTTP services where reachability of a port is the signal: Redis, Postgres, RabbitMQ, internal RPC services. The agent opens a TCP connection, records the connect time in milliseconds, and closes the connection.
Configuration shape
{
"host": "redis.internal",
"port": 6379,
"timeout_ms": 2000
}
Field reference
| Field | Default | Notes |
|---|---|---|
host | required | Hostname or IP. |
port | required | Integer in 1..65535. |
timeout_ms | 2000 | Aborts the connection attempt when exceeded. |
Reason codes
| Reason | Meaning |
|---|---|
ETIMEDOUT | Connection attempt did not complete within timeout_ms. |
ECONNREFUSED | TCP connection refused. |
ENOTFOUND / EAI_AGAIN | DNS resolution failed. |
tcp_error | Other socket error. The exact code is logged on the agent. |
Threshold examples
| Goal | Healthy | Unhealthy |
|---|---|---|
| Reachable + fast handshake | under 50 | over 500 |
| Reachable | under 1000 | over 1500 |
Pure reachability with no latency requirement: set unhealthy at
timeout_ms - 1, leaving anything below as healthy.
Was this page helpful?