Skip to content

Nagios Plugin check_tcpcount

Davide Madrisan edited this page Feb 16, 2017 · 1 revision

check_tcpcount - check the tcp network usage (tcp eshablished connections)

[/etc/nrpe.d/check_tcpcount]
command[check_tcp4count]=/usr/lib/nagios/plugins/check_tcpcount -w 1500 -c 2000
command[check_tcp6count]=/usr/lib/nagios/plugins/check_tcpcount --tcp6 -w 1500 -c 2000
command[check_tcpcount]=/usr/lib/nagios/plugins/check_tcpcount --tcp --tcp6 -w 1500 -c 2000
Usage note
This plugin displays TCP network and socket informations.
Copyright (C) 2014,2015 Davide Madrisan <[email protected]>
Usage:
  check_tcpcount [--tcp] [--tcp6] [-w COUNTER] [-c COUNTER]
Options:
  -t, --tcp       display the statistics for the TCP protocol (the default)
  -6, --tcp6      display the statistics for the TCPv6 protocol
  -w, --warning COUNTER   warning threshold
  -c, --critical COUNTER   critical threshold
  -v, --verbose   show details for command-line debugging (Nagios may truncate output)
  -h, --help      display this help and exit
  -V, --version   output version information and exit
Examples:
  check_tcpcount --tcp -w 1000 -c 1500          # TCPv4 only (the default)
  check_tcpcount --tcp --tcp6 -w 1500 -c 2000   # TCPv4 and TCPv6
  check_tcpcount --tcp6 -w 1500 -c 2000         # TCPv6 only
Example of output
tcpcount OK - 13 tcp established | tcp_established=13 tcp_syn_sent=0 tcp_syn_recv=0 tcp_fin_wait1=0 tcp_fin_wait2=0 tcp_time_wait=0 tcp_close=0 tcp_close_wait=1 tcp_last_ack=0 tcp_listen=4 tcp_closing=0
Performance data

tcp_established tcp_syn_sent tcp_syn_recv tcp_fin_wait1 tcp_fin_wait2 tcp_time_wait tcp_close tcp_close_wait tcp_last_ack tcp_listen tcp_closing