2.10TCP
What it checks#
A TCP monitor opens a connection to a host and port, measures how long it took, and closes it. Nothing is sent. A port is the number a service listens on, such as 5432 for PostgreSQL. Use it for services that are not websites, such as databases, SSH and mail servers.
When it is up, degraded or down#
- Up: the connection opened within the timeout, and the response-time assertion passed, if you set one.
- Degraded: the connection was slower than your slow limit, if you set one.
- Down: the connection failed or timed out, or the assertion failed, for example
assertion response_time_ms < 50: got 73.
Configuration#
| Dashboard field | Default | Limits and notes |
|---|---|---|
| name | Empty | Required. Up to 200 characters, on one line. |
| check interval | 60 seconds | At least 1 second. Your plan's minimum interval still applies: below it the form shows Your plan checks at most every N seconds. |
| timeout | 10 seconds | In seconds. A value above 60 seconds counts as 60 seconds. |
| locations | None (runs from us-west) | Choose from the regions shown. The check runs from each one you pick. |
| on failure — notify | None (all team channels) | Pick channels to limit who is alerted. Shown only when your team has channels. |
| endpoint (host) | Empty | Required. Host only, such as db.acme.io. A scheme, port or path gives Host only — no scheme, port or path. |
| endpoint (port) | Empty | Required. 1 to 65535. |
| assertions — response-time only for tcp | response_time_ms lt 50 | Response time only. |
Assertions supported#
response_time_ms only: the time it took to open the connection. The operator list shows eq, neq, contains, lt, gt and matches.
Example#
{
"name": "db.acme.io postgres",
"host": "db.acme.io",
"port": 5432,
"intervalSeconds": 60,
"assertions": [
{"type": "response_time_ms", "op": "ASSERTION_OP_LT", "value": "200"}
]
}Good to know#
- A TCP check only proves the port accepts connections. It does not log in or run a query.
- Server errors:
host required,port must be in 1..65535.