Skip to content

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 fieldDefaultLimits and notes
nameEmptyRequired. Up to 200 characters, on one line.
check interval60 secondsAt least 1 second. Your plan's minimum interval still applies: below it the form shows Your plan checks at most every N seconds.
timeout10 secondsIn seconds. A value above 60 seconds counts as 60 seconds.
locationsNone (runs from us-west)Choose from the regions shown. The check runs from each one you pick.
on failure — notifyNone (all team channels)Pick channels to limit who is alerted. Shown only when your team has channels.
endpoint (host)EmptyRequired. Host only, such as db.acme.io. A scheme, port or path gives Host only — no scheme, port or path.
endpoint (port)EmptyRequired. 1 to 65535.
assertions — response-time only for tcpresponse_time_ms lt 50Response 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#

API request body (CreateTcpMonitor)
json
{
  "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.

Last updated