> ## Documentation Index
> Fetch the complete documentation index at: https://docs.use.observer/llms.txt
> Use this file to discover all available pages before exploring further.

# 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

```json theme={null}
{
  "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

The full catalog, with the hint the console shows for each code, is in [Reason codes](https://docs.use.observer/agent/reference/reason-codes.md).

| Reason | Meaning |
| - | - |
| `ETIMEDOUT` | Connection attempt did not complete within `timeout_ms`. |
| `ECONNREFUSED` | TCP connection refused. |
| `ENOTFOUND` / `EAI_AGAIN` | DNS resolution failed. |
| `ECONNRESET` | The target closed the connection. |
| `EHOSTUNREACH` | No network route from the agent to the host. |
| `connect_failed` | The connection could not be opened for another reason. |
| `tcp_error` | Other socket error the agent does not classify. |

## 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.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.