Skip to main content

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

OptionDescriptionDefault
HostHostname or IP addressRequired
PortTCP port numberRequired
TimeoutMaximum time to wait for connection10s
IntervalHow often to run the check60s
RegionsWhich regions run the checkAll

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

ServicePort
MySQL3306
PostgreSQL5432
Redis6379
MongoDB27017
SMTP25/587
SSH22