Menu

Site navigation

LivePulser
Browse the docs

TCP port monitoring

Check that a service's port is open.

A port monitor checks whether a TCP port on a host accepts connections, from each region you choose. If the port is open, the check passes. If it's closed, filtered by a firewall, or the scan doesn't finish within the timeout, the check fails.

When to use it

Use a port monitor for TCP services that don't speak HTTP: SSH, mail servers, game servers or any custom TCP service. For a web service, an HTTP monitor tells you more.

ServicePortWhat a successful check tells you
SSH22The SSH daemon is accepting connections. It doesn't prove your key or password works.
SMTP submission587The mail server is accepting connections. It doesn't prove mail is delivered.
IMAP over TLS993The mail server is listening. It doesn't prove a mailbox can be opened.
Custom TCP serviceYour portSomething is listening and the network path is open. It doesn't test your protocol.

In every case, an accepted connection means something is listening on that port and the network path is open. It doesn't test the protocol on top. If the service needs a deeper check, expose a small HTTP health endpoint that exercises it and monitor that instead.

How the check works

Each check scans the one port with nmap. A failed check shows the protocol, host and port as its Outgoing request, for example TCP mail.example.com:587, and a plain sentence as its Server response. nmap reports the port as one of these states:

StateWhat it meansResult
openThe host accepted the connection.Passes.
closedThe host answered, but nothing listens on the port.Fails: Port 587/TCP is closed.
filteredNo answer: a firewall or security group dropped the packets.Fails: Port 587/TCP is filtered (nothing answered).
open|filteredUDP only: nothing answered. A firewall and a service that stays silent look the same.Fails: Port 5000/UDP gave no reply (open or filtered).

The word after the state is nmap's usual service name for that port number. It isn't detected from your service. LivePulser scans the port directly, without pinging the host first, so a server that blocks ping is still checked correctly. If the scan runs out of time, the check fails with Scan timeout instead of a port state. See Common monitoring errors.

Before you begin

  • A public host name or IPv4 address. IPv6 isn't supported yet: checks run over IPv4, so a host name needs an IPv4 (A) record. The same address rules apply as for ping monitors: loopback, private and link-local addresses, cloud metadata names, and names that end in .local, .internal, .localhost, .localdomain or .home.arpa, are rejected. So are host names without a dot, such as redis or db. IP addresses still work.
  • The port open to the internet on the host and on any firewall or cloud security group in front of it.

Test from a machine outside your network first. With netcat:

Linux and macOS
nc -vz -w 5 mail.example.com 587
Windows PowerShell
Test-NetConnection mail.example.com -Port 587

If the connection doesn't succeed from outside, the LivePulser monitor will fail too. You can also click Test in the wizard to check the port once from a LivePulser probe.

Create a port monitor

  1. Click New monitor and choose Port.
  2. Enter a Name, the Hostname (for example mail.example.com, without https://) and the Port (for example 587).
  3. Leave Protocol set to TCP.
  4. Optionally, click Test to check the port once now from a probe. It shows Up or Down, where it ran from and the response time. Nothing is saved. See Test before you create. Click Continue.
  5. On the Settings step, choose the Check frequency and Monitoring regions, and adjust Timeout and Retries under Advanced settings if needed. Click Continue.
  6. Choose where alerts go on the Alerts step, then click Create monitor on the Review step.

Check that it works

Click View monitor on the Monitor created screen. The Connection details card shows the host, port and protocol you saved. After the first checks, Health Status should read Healthy and response times appear per region. The Timeout line shows how long each check waits for an answer.

Example: an SMTP submission port

To know when your mail server stops accepting submissions, create a port monitor with Hostname mail.example.com, Port 587, Protocol TCP, a 1-minute Check frequency (5 minutes on Free) and two regions, such as Virginia, USA and Frankfurt, Germany. You're alerted when the first region opens an incident. If both regions fail, the monitor is Down. Pair it with a resource monitor on the same machine to catch a full disk before the mail service stops.

Settings

SettingMeaningDefault and limits
HostnameThe host name or IPv4 address of the server.Required. Up to 253 characters. A host name needs at least one dot.
PortThe TCP port the service listens on.Required. 1 to 65535.
ProtocolTCP or UDP scan.TCP. UDP checks pass only when the service replies, so most custom UDP services show as down.
Check frequencyHow often each region connects.5 minutes. Up to 24 hours. The fastest is 5 minutes on Free, 1 minute on Starter and Team, 30 seconds on Pro.
Monitoring regionsWhere the connections come from.Virginia, Frankfurt and Singapore. At least one. Up to 3 on Free, all 7 on paid plans.
TimeoutThe longest the whole scan may take, in whole seconds. It's also passed to nmap as --host-timeout.30 seconds. 5 to 30 seconds on Free, 5 to 60 seconds on paid plans.
RetriesHow many failed checks in a row open an incident. 0 and 1 both open one on the first failure.3. From 0 to 5.

Change the host or port later with Host and port in the monitor's actions sidebar, regions with Monitoring locations, and frequency, timeout and retries with Check settings. With Immediate retry on (paid plans only), the remaining retries run 2 seconds apart straight after the first failed check, each with a timeout of at most 5 seconds. See the Settings reference.

Results and alerts

The monitor page shows Health Status, Latest check, Uptime overview and response times per region. When connections fail, an incident opens with a row per failing region, and the monitor's destinations are notified once. Some regions failing makes the monitor Degraded; all regions failing makes it Down. When every region connects again, the incident resolves and a recovery alert is sent. See Incidents and recovery.

Troubleshooting

ProblemLikely causeWhat to do
nc reports "Connection refused" from outsideNothing is listening, or the service only listens on localhost (127.0.0.1).Check the service is running and bound to a public interface.
nc waits and then times outA firewall or cloud security group silently drops the connection.Allow inbound TCP on that port from the internet.
Server response is Scan timeoutThe scan didn't finish within the timeout.Raise Timeout in Check settings, and check the host isn't dropping packets.
Fails from some regions onlyThe firewall only allows certain countries or addresses.Check your allow-list, or remove regions you block on purpose in Monitoring locations.
Up, but the service is brokenA port check only tests that the connection is accepted.Add an HTTP health endpoint that exercises the service.
"already has the most LivePulser port monitors allowed" or "up to 10 different ports on one host" when savingThat host and port already has 3 port monitors, or your team already watches 10 ports on that host.Remove a monitor you no longer need, or contact us if it's your server.
Hostname rejected when savingA private or loopback address, a cloud metadata name, a name ending in .local, .internal or a similar private suffix, a scheme or path, or a name without a dot ("use a full domain name, like example.com").Enter only the full public host name or IP. See Common setup problems.