Skip to content

TCP port (tcp_port) ​

Opens a TCP connection to a port and measures how long the connection takes. It can also read the server's greeting and check it.

What it looks like ​

The page of a tcp_port sensor in the light theme

The sensor's page after a few polls, watching a TCP listener the test run starts on this machine. In the dark theme: the sensor's page. The form for adding it, with its parameters filled in: light, dark.

Channels ​

KeyNameUnitDefault limits
connect_msConnect timemswarning above 1000, error above 3000

Parameters ​

ParameterDefaultMeaning
portrequiredTCP port, 1 to 65535.
expect_bannernoneWhen set, read the server's greeting and require it to contain this text (a substring, not a pattern). Use it where the server speaks first: SSH-2.0 for SSH, 220 for SMTP. It must not be empty; leave it out to skip the check.
banner_wait_ms2000How long to wait for the greeting, 50 to 30000. It never takes more than half the poll timeout.

Suggested interval: 60 seconds. No credential. At most the first 512 bytes of the greeting are read.

On the target ​

The port must accept connections from the probe host. Nothing else is required, and nothing is sent.

Failures ​

MessageMeaning
Connection refused or timed out (kind unreachable or timeout)The service is not listening, or a firewall is dropping the traffic.
port N is open but sent no greeting; expected one containing "..."The port is open, but the server did not speak first within banner_wait_ms. The sensor is Down. Either the service is not one that greets, or it is hung.
port N greeting "..." does not contain "..."Something answers on the port but it is not what you expect. The sensor is Down; it is a successful poll, not a collection failure.

AGPL-3.0-only