Prerequisites
Prerequisites
Before creating TCP Monitors, ensure you have:
- An initialized Checkly CLI project
- Network access to the TCP services you want to monitor
- Knowledge of the target hostname and port number
- Understanding of the expected response format (if sending data)
Configuration
The TCP Monitoring configuration consists of specific TCP monitoring options and inherited general monitoring options.- TCP Monitor
- General Monitor
TcpMonitor Options
TCP connection configuration that defines the hostname, port, and optional data to send.Usage:Parameters:Use cases: Database connectivity, cache service monitoring, custom TCP service validation.
Examples:
- Database Connection
- Redis with Commands
- IPv6 Connection
Response time threshold in milliseconds for marking the monitor as degraded (warning state).Usage:Examples:Use cases: Early performance warnings, gradual degradation detection.
Maximum response time in milliseconds before the monitor is marked as failed.Usage:Examples:Use cases: Performance monitoring, SLA compliance, connection timeout management.
TcpMonitor Assertions
To define assertions for the request of an TcpMonitor you should use the TcpAssertionBuilder. The following sources are available for TCP monitor assertions:
responseTime(): Assert the total response time of the TCP requestresponseData(): Assert the value in the response data
- Assert the total response time of the TCP request
- Asserting the value in the response
General Monitor Options
Friendly name for your TCP monitor that will be displayed in the Checkly dashboard and used in notifications.Usage:
How often the TCP monitor should run. Use the Examples:Available frequencies:
Frequency enum to set the check interval.Usage:- Critical Services
- Standard Services
- Background Services
EVERY_10S, EVERY_20S, EVERY_30S, EVERY_1M, EVERY_2M, EVERY_5M, EVERY_10M, EVERY_15M, EVERY_30M, EVERY_1H, EVERY_2H, EVERY_3H, EVERY_6H, EVERY_12H, EVERY_24HArray of public location codes where the TCP monitor should run from. Multiple locations provide geographic coverage.Usage:Examples:Use cases: Global connectivity testing, regional service monitoring, network latency analysis.
- Multi-Region Database
- Regional Service
Whether the TCP monitor is enabled and will run according to its schedule.Usage:Examples:
Examples
- Database (PostgreSQL)
- Redis Cache
- SMTP Server
- SSH Server
- Custom Application Port
- Connection Failure Test