Overview
Port monitoring checks if a specific TCP port is open and accepting connections on your server. This is essential for monitoring services like databases, mail servers, FTP, SSH, and other TCP-based services.Port monitoring verifies that a service is listening and accepting connections, but doesn’t validate the service is functioning correctly. Use HTTP monitoring for web services to verify full functionality.
Use Cases
Database Servers
Monitor MySQL, PostgreSQL, MongoDB, Redis
Mail Servers
Check SMTP, POP3, IMAP availability
File Transfer
Monitor FTP, SFTP, SSH services
Custom Services
Any TCP-based service on custom ports
Creating a Port Monitor
1
Basic Configuration
2
Select Protocol (Optional)
Choose a protocol for enhanced validation:
- Generic: Basic TCP connection test
- SMTP: Mail server protocol validation
- POP3: Email retrieval validation
- FTP: File transfer protocol validation
- SSH: Secure shell protocol validation
- HTTP/HTTPS: Web server validation (use HTTP monitor instead)
3
Configure Protocol Validation
For supported protocols, enable additional checks like banner validation or test commands.
Common Ports
- Databases
- Mail Services
- File Transfer
- Other Services
| Service | Port | Protocol |
|---|---|---|
| MySQL | 3306 | TCP |
| PostgreSQL | 5432 | TCP |
| MongoDB | 27017 | TCP |
| Redis | 6379 | TCP |
| SQL Server | 1433 | TCP |
| Oracle | 1521 | TCP |
Protocol Validation
Generic TCP
Basic connection test without protocol-specific validation:- Port is open
- TCP connection can be established
- Connection time
SMTP Protocol
Enhanced validation for mail servers:- TCP connection established
- SMTP banner received (e.g., “220 mail.example.com ESMTP”)
- Optional: Send EHLO command and verify response
SMTP validation helps detect when the port is open but the mail service isn’t responding correctly.
POP3 Protocol
Validation for email retrieval servers:- TCP connection established
- POP3 banner received (e.g., “+OK POP3 server ready”)
FTP Protocol
Validation for file transfer servers:- TCP connection established
- FTP banner received (e.g., “220 FTP Server ready”)
SSH Protocol
Validation for secure shell servers:- TCP connection established
- SSH banner received (e.g., “SSH-2.0-OpenSSH_8.2p1”)
Connection Timeout
Set how long to wait for connection establishment:| Timeout | Use Case |
|---|---|
| 1-5 seconds | Local network, fast services |
| 10 seconds (Default) | Standard, works for most scenarios |
| 15-30 seconds | Slow networks, distant servers |
SSL/TLS Support
For services that support SSL/TLS encryption:- TCP connection established
- SSL/TLS handshake successful
- Certificate validity (if validation enabled)
Response Data
Port monitors can capture and validate response data:Banner Capture
Banner Capture
Expected Response
Expected Response
Validate the server responds with expected text:Creates incident if response doesn’t match.
Response Truncation
Response Truncation
Large responses are truncated to prevent excessive data storage:
- Maximum size: 1 KB
- Truncation indicator: Response includes truncation notice
Only the first 1 KB of response data is captured. This is sufficient for banner validation.
Example Configurations
Best Practices
Use protocol validation when available
Use protocol validation when available
Protocol-specific validation provides better detection of service issues:Generic: Only checks if port is open
SMTP: Checks if mail service is responding correctlyUse protocol validation for critical services.
Set appropriate timeouts
Set appropriate timeouts
- Fast local services: 5 seconds
- Standard services: 10 seconds
- Slow or distant services: 15-30 seconds
Monitor from relevant regions
Monitor from relevant regions
Choose regions based on:
- Where your users connect from
- Where your service is hosted
- Network paths you want to test
Combine with other monitor types
Combine with other monitor types
For comprehensive monitoring:
- Ping: Verify server is online
- Port: Verify service is accepting connections
- HTTP: Verify service is responding correctly (for web services)
Security Considerations
Firewall Configuration
Firewall Configuration
- Only allow connections from UptimeIO’s IP ranges
- Use security groups or firewall rules
- Don’t expose unnecessary ports publicly
Database Monitoring
Database Monitoring
- Never expose database ports publicly if possible
- Use VPN or private network for monitoring
- If public, use strong authentication and encryption
- Monitor from specific IP ranges only
Authentication
Authentication
Port monitoring only tests connectivity, not authentication:
- Service may be running but authentication could be broken
- Consider application-level monitoring for full validation
- Use HTTP monitors with authentication for APIs
Troubleshooting
Connection refused
Connection refused
Possible causes:
- Service is not running
- Wrong port number
- Firewall blocking connections
- Service bound to localhost only
- Verify service is running
- Check port number is correct
- Test connection from your machine:
telnet host port - Review firewall rules
- Check service bind address
Connection timeout
Connection timeout
Possible causes:
- Firewall dropping packets (no response)
- Network routing issues
- Service overloaded
- Timeout set too low
- Increase timeout value
- Check firewall logs
- Verify network connectivity
- Check service load
Unexpected banner/response
Unexpected banner/response
SSL/TLS errors
SSL/TLS errors
Possible causes:
- Certificate expired or invalid
- Certificate hostname mismatch
- Unsupported SSL/TLS version
- Self-signed certificate with validation enabled
- Check certificate expiration
- Verify certificate hostname
- Test with
openssl s_client - Disable validation for self-signed certs (testing only)
Port vs HTTP Monitoring
Choose the right monitor type:| Feature | Port Monitor | HTTP Monitor |
|---|---|---|
| What it checks | Port is open, accepting connections | HTTP service responding correctly |
| Validation | TCP connection + optional banner | Status code, headers, body, SSL |
| Speed | Very fast | Fast |
| Detail | Basic connectivity | Full application validation |
| Use for | Non-HTTP services | Web services, APIs |
Monitoring Private Services
To monitor services on private networks:1
Option 1: VPN
Establish VPN connection between UptimeIO and your private network.
2
Option 2: Bastion Host
Deploy a bastion host that UptimeIO can access, which forwards checks to internal services.
3
Option 3: Monitoring Agent
Deploy a monitoring agent in your private network that performs checks and reports to UptimeIO.