TCP Monitors
Monitor port connectivity, TLS certificates, and service availability with TCP monitors.
TCP Monitors
TCP monitors verify that a port is open and responding. Use them to monitor databases, mail servers, custom services, and TLS certificate health.
Creating a TCP Monitor
Basic Configuration
Name: Database Connection Check
Host: db.example.com
Port: 5432
Interval: 1 minuteFull Configuration
Name: PostgreSQL Monitor
Host: db.example.com
Port: 5432
Timeout: 10 seconds
TLS:
Enabled: false
Interval: 1 minute
Locations:
- us-east
- eu-westConnection Types
Plain TCP
Simple port connectivity check:
Name: Redis Monitor
Host: redis.example.com
Port: 6379
TLS:
Enabled: falseTLS/SSL
Secure connection with certificate validation:
Name: HTTPS Server
Host: example.com
Port: 443
TLS:
Enabled: true
Verify: trueTLS Certificate Monitoring
When TLS is enabled, tracer captures certificate details:
Certificate Information
| Field | Description |
|---|---|
| Subject | Certificate subject (domain) |
| Issuer | Certificate authority |
| Valid From | Start date |
| Valid Until | Expiration date |
| Days Remaining | Days until expiration |
| Chain Valid | Certificate chain validation |
| Protocol | TLS version (1.2, 1.3) |
| Cipher | Cipher suite used |
Certificate Alerts
Set up alerts for certificate expiration:
TLS:
Enabled: true
Alert Before Expiry: 30 daysThis triggers an alert 30 days before the certificate expires.
Common Use Cases
Database Monitoring
PostgreSQL
Host: postgres.example.com
Port: 5432
TLS: falseMySQL
Host: mysql.example.com
Port: 3306
TLS: falseMongoDB
Host: mongo.example.com
Port: 27017
TLS: trueRedis
Host: redis.example.com
Port: 6379
TLS: falseMail Servers
SMTP
Name: Mail Server - SMTP
Host: mail.example.com
Port: 25
TLS: falseSMTP with STARTTLS
Name: Mail Server - STARTTLS
Host: mail.example.com
Port: 587
TLS: trueIMAP
Name: Mail Server - IMAP
Host: mail.example.com
Port: 993
TLS: trueCustom Services
SSH
Name: SSH Server
Host: server.example.com
Port: 22
TLS: falseMessage Queues
Name: RabbitMQ
Host: rabbitmq.example.com
Port: 5672
TLS: falseResponse Metrics
Each run captures:
| Metric | Description |
|---|---|
| Connect Time | Time to establish connection |
| TLS Time | TLS handshake duration (if TLS enabled) |
| Total Time | Total check duration |
| Connection Status | Success/failure |
Assertions
Connection Success
Assertions:
- type: connection
status: successResponse Time
Assertions:
- type: response_time
less_than: 500 # millisecondsTLS Certificate Expiry
Assertions:
- type: certificate_expiry
greater_than: 30 # daysTLS Version
Assertions:
- type: tls_version
in: ["TLSv1.2", "TLSv1.3"]Advanced Configuration
Connection Options
Timeout: 30 seconds
Retry on Failure: true
Max Retries: 3
Retry Delay: 5 secondsTLS Options
TLS:
Enabled: true
Verify: true
Min Version: TLSv1.2
Server Name: example.com # SNI
Skip Hostname Verify: falseSetting Skip Hostname Verify: true or Verify: false reduces security. Only use for testing or internal services with self-signed certificates.
Send Data After Connect
For services that expect data after connection:
Send After Connect: "PING\r\n"
Expect Response: "+PONG"This is useful for Redis, memcached, and similar services.
Troubleshooting
Connection Refused
Problem: Monitor reports "connection refused"
Causes:
- Service not running
- Wrong port number
- Firewall blocking connection
Solutions:
- Verify service is running
- Check port number
- Verify firewall rules allow connection from tracer IPs
Connection Timeout
Problem: Monitor times out
Causes:
- Network issues
- Service overloaded
- Firewall dropping packets (vs rejecting)
Solutions:
- Increase timeout value
- Check network path
- Verify service health
- Check for rate limiting
TLS Handshake Failed
Problem: TLS connection fails
Causes:
- Certificate expired
- Certificate hostname mismatch
- Incompatible TLS version
- Self-signed certificate
Solutions:
- Renew certificate
- Check certificate subject matches host
- Update minimum TLS version
- For self-signed: set
Skip Hostname Verify: true
tracer monitors connect from specific IP addresses. You may need to allowlist these IPs in your firewall. Check the Agent IPs page for current addresses.
Best Practices
- Monitor critical infrastructure - Databases, caches, message queues
- Set appropriate timeouts - Account for network latency
- Use TLS where available - And monitor certificate expiration
- Run from multiple locations - Identify network-specific issues
- Alert on certificate expiry - Set alerts for 30+ days before expiration
- Combine with application monitoring - TCP up doesn't mean app is healthy