Skip to main content
TCP monitors require a host and port. Additional options control timeout behavior and response time thresholds.
Define this in code. YAML format · Terraform

Config fields

FieldTypeRequiredDefaultDescription
config.hoststringYesHostname or IP address
config.portintegerNoTCP port (1–65535)
config.timeoutMsintegerNo10000Connection timeout in milliseconds

Assertions

AssertionFieldsDescription
tcp_connects(none)Passes if a TCP connection is established
tcp_response_timemaxMs (integer)Fails if connection time exceeds threshold
tcp_response_time_warnwarnMs (integer)Records degraded hint if connection time is elevated

Examples

Basic port check

monitors:
  - name: Redis
    type: TCP
    config:
      host: redis.example.com
      port: 6379
    frequencySeconds: 60
    regions: [us-east]
    assertions:
      - type: tcp_connects
        severity: fail

With response time threshold

monitors:
  - name: PostgreSQL
    type: TCP
    config:
      host: db.example.com
      port: 5432
      timeoutMs: 5000
    frequencySeconds: 60
    regions: [us-east, eu-west]
    assertions:
      - type: tcp_connects
        severity: fail
      - type: tcp_response_time
        maxMs: 500
        severity: fail
      - type: tcp_response_time_warn
        warnMs: 200
        severity: warn

Next steps

TCP overview

When to use TCP monitors.

Regions

Available probe regions.