TCP port monitoring checks that a server still accepts connections on a port, such as 587 for sending mail, 22 for SSH or 5432 for PostgreSQL, and alerts you when it refuses them or stops answering. It’s the uptime check for the services that aren’t web pages. Monity (monity.ai) port monitors open a connection from the internet every 30 seconds to every hour, depending on the plan, and re-check a failure 3 and 6 seconds later before they alert.
What a port check tells you, and what it doesn’t
| Check | Tells you | Misses |
|---|---|---|
| Ping (ICMP) | The host answers on the network | A service that stopped, and hosts or firewalls that drop ping |
| TCP port | Something is listening on the port and the firewall lets you through | A service that accepts connections but fails: a database refusing queries, a mail server rejecting mail |
| Application | The service does its job: an HTTP status and answer, a page’s text, a sign-in that works | Problems outside what it checks, and it needs an address that answers HTTP |
So a port check sits in the middle: stronger than ping for a service, weaker than a check of the service itself. Where the service has a web front or a health endpoint, watch that too. Monity’s port monitors make a TCP connection; they don’t ping. For a one-off ping, use the free ping check.
Common ports to watch
From the IANA port number registry:
| Port | Service | Watch it for |
|---|---|---|
| 25 | SMTP | Mail from other servers reaching yours |
| 587 | Message submission | Your apps and users sending mail |
| 465 | Message submission over TLS (RFC 8314) | The same, over TLS from the first byte |
| 993 | IMAP over TLS | People reading their mail |
| 22 | SSH | Being able to get into a server |
| 3306 and 5432 | MySQL and PostgreSQL | A database other services reach over the network |
| 6379 | Redis | A cache or queue other services depend on |
| 3389 | Remote Desktop (“MS WBT Server”) | Remote access to a Windows machine |
Should a database port face the internet?
Usually not, and you shouldn’t open one just to monitor it. A port monitor checks from the internet, so it only makes sense for a port that’s meant to be reachable there, like a mail server’s. For a database behind a firewall, watch what is public instead (the app’s health endpoint, with a check on its JSON answer), or have a job inside your network call a heartbeat link: no call in time, and you get the alert.
Check a port by hand
- macOS and Linux:
nc -vz mail.example.com 587 - Windows PowerShell:
Test-NetConnection mail.example.com -Port 587
Run it from outside your network too: a port can be open from the office and closed from the internet. Monity’s free port checker tests a public host and port from outside your network.
Set up a port monitor in Monity
- Add an uptime monitor and choose Port. Enter a public host name or IP address and the port. Private addresses are refused, since Monity checks from the internet.
- Choose how often. Every 5 minutes on the free plan, every minute on plans that check pages every 15 to 60 minutes, every 30 seconds on plans that check pages every 5 minutes. 1,000 checks use one credit, so a monitor checked every minute uses about 44 credits a month.
- Choose where alerts go: email, Slack, Microsoft Teams, Discord, Telegram, a webhook or the phone app, with a reminder until someone acknowledges and a message when it’s back.
- Add it to a status page if your users depend on the service, and set a maintenance window for planned work, so it isn’t counted as downtime.

When the port stops answering, Monity opens an incident with the failed check’s status and timings and a likely cause, and the downtime counts in the monitor’s SLA report. More: every kind of uptime monitor, uptime monitoring, API monitoring, cron job monitoring and SSL certificate expiry monitoring.