TCP Monitor
The TCP monitor checks whether a TCP connection can be established to a specific host and port. It is useful for monitoring databases, mail servers, game servers, and any service that listens on a TCP port.
Configuration Options
| Option | Description | Default |
|---|---|---|
| Host | Hostname or IP address | Required |
| Port | TCP port number | Required |
| Timeout | Maximum time to wait for connection | 10s |
| Interval | How often to run the check | 60s |
| Regions | Which regions run the check | All |
How It Works
The monitor attempts to open a TCP connection to the specified host and port. If the connection is established within the timeout period, the check passes. If the connection is refused, times out, or fails for any other reason, the check fails.
Example
Monitor a database port
curl -X POST https://app.kamustatus.com/api/monitors \
-H "x-api-key: km_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "PostgreSQL",
"type": "tcp",
"host": "db.example.com",
"port": 5432,
"interval": 60
}'
Monitor a Redis instance
curl -X POST https://app.kamustatus.com/api/monitors \
-H "x-api-key: km_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Redis",
"type": "tcp",
"host": "redis.example.com",
"port": 6379,
"interval": 30
}'
Common Ports
| Service | Port |
|---|---|
| MySQL | 3306 |
| PostgreSQL | 5432 |
| Redis | 6379 |
| MongoDB | 27017 |
| SMTP | 25/587 |
| SSH | 22 |