A port monitor checks that a service on a server is accepting connections. A port is a numbered door on a server that one service listens on, such as 5432 for PostgreSQL. The monitor opens a TCP connection, the kind most internet services use, to the host and port and checks that it succeeds.
Use it for services without a web address, such as databases, mail servers, SSH (remote server login), message brokers or game servers. It proves that something is listening on the port and reachable from the internet.
Add a port monitor
Section titled “Add a port monitor”-
Open Monitors in the sidebar and select New monitor.
-
Choose the Port tab.
-
In Host, enter the server’s hostname or IP address, for example
smtp.example.com, up to 253 characters. Enter the host only, without a scheme or path. -
In Port, enter the port number, from 1 to 65535, for example
587. See Common ports if you are not sure. -
In Name, enter what your team calls the service, for example “Mail submission”.
-
Open Advanced settings if you want to change Check every and Locations. See Create a monitor.
-
Under Test first, select Run test to confirm the port accepts a connection.
-
Select Create monitor.
-
Open the monitor’s Notifications tab and choose who gets alerted. A new monitor alerts nobody until you do.
-
Select Save changes.
Set up alerts for the monitor covers each alert setting.
The monitor shows Pending until its first check reports, then Up if the port accepts the connection.
How a port check works
Section titled “How a port check works”Each check opens a TCP connection from one of the monitor’s locations, taking turns through the locations you selected. The check passes when the connection is established. The check sends no data after the connection opens, so it does not log in, send a command or read the service’s greeting.
The response time is the time taken to establish the connection.
StatusCheck re-checks a failure from another location before it marks the monitor Down. See Locations and confirmation.
Common ports
Section titled “Common ports”| Service | Port |
|---|---|
| SSH | 22 |
| SMTP, server to server | 25 |
| SMTP submission | 587 |
| PostgreSQL | 5432 |
| MySQL | 3306 |
| Redis | 6379 |
Because the check only opens a connection, a port monitor tells you the service is listening, not that it is healthy. A database can accept connections while refusing queries. If the service has an HTTP health endpoint, add an HTTP(s) monitor for it as well.
Firewalls and allowlists
Section titled “Firewalls and allowlists”Checks come from StatusCheck’s locations on the public internet. A port check sends no User-Agent or other identifying data. A firewall that only allows known addresses (an allowlist) blocks the checks, and the monitor reports down.
Opening a database port to the whole internet only to monitor it is rarely a good trade. Monitor a service in front of it instead, such as a health check URL in your app that queries the database. You can make that public safely and watch it with an HTTP(s) monitor.
Troubleshooting
Section titled “Troubleshooting”The monitor is down, but the service works from inside our network. The port is not reachable from the internet. Usually a firewall or your cloud provider’s security group only allows internal addresses. Test from outside your network, or monitor a public health check URL instead.
The check fails with a timeout rather than a refused connection. A firewall is silently ignoring the connection attempts. A refused connection usually means the host is reachable but nothing is listening on that port. Check the port number and that the service is running.
Related
Section titled “Related”- HTTP(s) monitors check that a service answers correctly, not only that it is listening.
- Ping monitors check that the host itself is reachable.
- Locations and confirmation explains where checks come from.