Port monitoring diagram showing TCP connection checks on ports 22, 25, 3306 and 5432
# website monitoring

What Is Port Monitoring and When Do You Need It?

HTTP uptime monitoring checks whether a website responds correctly to HTTP/HTTPS requests. But not every service communicates over HTTP. Databases, mail servers, FTP servers, and custom applications listen on non-HTTP ports. Port monitoring checks whether a specific TCP port is open and accepting connections — independent of what protocol runs on it.

How Port Monitoring Works

Port monitoring works by attempting a TCP connection to a specific host and port combination. If the connection succeeds (the port accepts the connection), the check passes. If it fails (connection refused, timed out, or unreachable), the check fails and triggers an alert.

This is equivalent to running:

telnet yourdomain.com 3306
# or
nc -z yourdomain.com 3306

A successful connection confirms the port is open and the service is listening. It doesn't validate the service's actual behaviour — just that it's accepting connections.

Common Services and Their Ports

ServiceDefault PortProtocol
HTTP80TCP
HTTPS443TCP
SSH22TCP
FTP21TCP
SMTP (email)25, 587TCP
IMAP143, 993TCP
MySQL/MariaDB3306TCP
PostgreSQL5432TCP
Redis6379TCP
MongoDB27017TCP
Elasticsearch9200TCP
RabbitMQ5672TCP
Custom APIsVariesTCP

When to Use Port Monitoring

Databases

Database monitoring via port is useful when:

  • Your database server is externally accessible (direct connection, not via application)
  • You need to verify the database daemon is running
  • You're monitoring a managed database service (RDS, Cloud SQL) for availability

Important: Most production databases should NOT be publicly accessible. If your MySQL is behind a VPC, port monitoring from an external service won't work. In that case, monitor the application that connects to the database, and use application-level health checks that test database connectivity.

Mail Servers

If you run your own mail server (Postfix, Exim), monitoring SMTP ports (25, 587) confirms email delivery is functioning. A closed SMTP port means emails are not being sent or received.

SSH Availability

Port 22 monitoring confirms SSH access to a server is available. Useful for:

  • Verifying jump host / bastion availability
  • Alerting if SSH is accidentally blocked (security group, firewall rule change)

Custom Services

Applications that expose custom TCP ports benefit from port monitoring when:

  • The service doesn't speak HTTP
  • You need to confirm the service process is running

Port Monitoring vs. HTTP Monitoring

AspectPort MonitoringHTTP Monitoring
What it checksTCP connection acceptedHTTP response (status, content)
Application layerNoYes
Validates response contentNoYes
Works with all servicesYes (any TCP)HTTPS/HTTP only
Depth of checkShallowDeep

HTTP monitoring is more thorough for web applications — it verifies the application is responding correctly, not just that a port is open. A web server with port 80 open might still return 500 errors; HTTP monitoring catches this while port monitoring doesn't.

Use port monitoring for non-HTTP services (databases, mail, SSH), and HTTP monitoring for everything web-based.

Security Considerations

Port monitoring from an external service requires the monitored port to be accessible from the internet. This is fine for web ports (80, 443) but should be carefully considered for services like databases.

Never expose database ports to the public internet just to enable port monitoring. Instead:

  • Monitor your application's health endpoint that tests the database connection
  • Use your cloud provider's internal monitoring for database availability

If you need to monitor a port that shouldn't be publicly accessible, use an agent installed inside your network that can reach the service.

Setting Up Port Monitoring

In Domain Monitor, port monitoring is configured alongside HTTP monitors:

Monitor type: Port
Host: yourdomain.com
Port: 3306
Check interval: 5 minutes
Alert channels: Email + Slack

Choose a check interval that makes sense for the service — critical services (mail server) might warrant 1-minute checks; less critical services can use 5 minutes.

Combining Port and HTTP Monitoring

For comprehensive coverage of a web server like Nginx or Apache:

  • HTTP monitor on port 443 — checks HTTPS response, content, and SSL
  • Port monitor on port 22 — confirms SSH access for emergency remediation

The HTTP monitor is your primary check; the port 22 monitor ensures you can get into the server to fix problems if the HTTP check fails.


Set up port monitoring alongside HTTP and SSL checks at Domain Monitor.

More posts

What Is Generative AI? How It Works and What It Creates

Generative AI creates new content — text, images, code, and more. This guide explains how it works, what tools are available, and where it's genuinely useful versus overhyped.

Read more
What Is Cursor AI? The AI Code Editor Explained

Cursor AI is an AI-powered code editor built on VS Code. Learn what it does, how it works, and whether it's the right tool for your development workflow.

Read more
What Is Claude Opus? Anthropic's Most Powerful Model Explained

Claude Opus is Anthropic's most capable AI model, built for complex reasoning and demanding tasks. Learn what it does, how it compares, and when to use it.

Read more

Subscribe to our PRO plan.

Looking to monitor your website and domains? Join our platform and start today.