Check network-port-tcp


Checks whether a network port is reachable. This command works with both IPv4 and IPv6.

The check works fine for tcp connections, but not for udp. The port response for udp is based on the target application (for example DNS or OpenVPN) and is not standard like tcp.

Fact Sheet

Check Plugin Download

Check Interval Recommendation

Once a minute

Can be called without parameters


Compiled for

Linux, Windows


usage: network-port-tcp [-h] [-V] [-H HOSTNAME] [-p PORT]
                        [--portname PORTNAME] [--severity {warn,crit}]
                        [-t TIMEOUT] [--type {tcp,tcp6}]

Checks whether a network port is reachable.

  -h, --help            show this help message and exit
  -V, --version         show program's version number and exit
  -H HOSTNAME, --hostname HOSTNAME
                        The host or ip address to check. Default: localhost
  -p PORT, --port PORT  The port number. Default: 22
  --portname PORTNAME   The display name of the port.
  --severity {warn,crit}
                        Severity for alerting. Default: warn
  -t TIMEOUT, --timeout TIMEOUT
                        Network timeout. Default: 2
  --type {tcp,tcp6}     Connection type. Default: tcp

Usage Examples

./network-port-tcp --hostname --port 443 --portname https --timeout 1.3 --state warn

Output: is reachable.


  • WARN (default) or CRIT if port is unreachable.

Perfdata / Metrics

There is no perfdata.

Credits, License