Skip to main content
By the end of this guide, you’ll have a TCP monitor verifying that your service is accepting connections on a specific port.
  • DevHelm CLI installed or an API token for REST calls
  • An API token set as DEVHELM_API_TOKEN — see Authentication
  • A host and port that accepts TCP connections

Create the monitor

1

Create the TCP monitor

devhelm monitors create \
  --name "Database Port" \
  --type TCP \
  --host db.example.com \
  --port 5432 \
  --frequency 60 \
  --regions us-east
2

Verify it's running

devhelm monitors list --type TCP
devhelm monitors get <monitor-id>
3

Check results

Results show whether the TCP connection was established and the connection time in milliseconds.
devhelm monitors checks <monitor-id> --limit 5

Add assertions

monitors:
  - name: Database Port
    type: TCP
    config:
      host: db.example.com
      port: 5432
    frequencySeconds: 60
    regions:
      - us-east
    assertions:
      - config:
          type: tcp_connects
        severity: fail
      - config:
          type: response_time
          thresholdMs: 1000
        severity: warn
Available TCP assertions:
TypeWhat it checks
tcp_connectsConnection is established within the timeout
response_timeConnection completes within a threshold
tcp_bannerThe server’s initial response matches an expected pattern
For details, see TCP configuration.

Common use cases

Monitor PostgreSQL (5432), MySQL (3306), Redis (6379), or any database port to detect connection issues before they affect your application.
Verify that microservices are accepting connections on their expected ports — useful for service mesh health checks.
Check that your mail server is accepting connections on port 25, 465, or 587.

Next steps

TCP monitor reference

Full TCP configuration and assertion details.

First alert

Get notified when the TCP connection fails.

Monitors guide

Configure all six monitor types.