Skip to main content

TCP & UDP Monitoring

TCP and UDP monitors check raw port connectivity — useful for databases, mail servers, DNS, and any service that isn't HTTP-based.

TCP Monitoring

TCP monitoring opens a raw connection to host:port and checks that the connection succeeds within the timeout.

Create a TCP monitor

FieldExampleNotes
Hostdb.yourapp.comHostname or IP address
Port5432Port number
Timeout5000Connection timeout in ms

Common TCP use cases

ServicePort
PostgreSQL5432
MySQL / MariaDB3306
MongoDB27017
Redis6379
Elasticsearch9200
RabbitMQ5672
SMTP25, 587, 465
IMAP993
SSH22
Custom TCP servicesAny

Send/expect (optional)

For protocols that respond to a greeting, you can send a string and check the response:

type: tcp
host: mail.yourapp.com
port: 25
send: "EHLO alertifypro.com\r\n"
expect: "250" # Response must start with 250 (SMTP OK)

UDP Monitoring

UDP monitoring sends a UDP packet and checks for a response.

note

UDP is connectionless — not all services respond to UDP probes. Test manually first.

Common UDP use cases

ServicePort
DNS53
NTP123
SNMP161
Syslog514
Game serversCustom

Configuration

type: udp
host: dns.yourapp.com
port: 53
payload: "Hello" # Bytes to send (hex or ASCII)
expect: "response" # Expected response string
timeout: 5000

Alerting on TCP/UDP

Alert rules work the same as HTTP monitors:

alert_policy:
consecutive_failures: 2
severity: critical
notify: [slack, pagerduty]

TCP/UDP monitors also report connection time (latency), and you can alert on slow connections:

assert:
connection_time_ms: { lt: 500 } # Alert if connection takes >500ms

Monitoring internal services

If your database is on a private network, use a private probe:

  1. Deploy the AlertifyPro probe agent inside your private network
  2. Assign your TCP monitor to use the private probe
  3. The probe checks internal services and reports back via encrypted tunnel

Private probes →