Page 1 of 1

alert for exceeding a set # of ESTABLISHED TCP connections

Posted: Wed Aug 01, 2018 11:14 am
by gornm565
I'd like to set up an alert when the number of ESTABLISHED TCP connections on a Windows box exceeds a certain number, let's say 150. These are the connections that are listed when I run "netstat -a" on Windows. Is there a check that I can easily utilize to monitor this?
Thank you.

Re: alert for exceeding a set # of ESTABLISHED TCP connectio

Posted: Wed Aug 01, 2018 12:10 pm
by cdienger
NCPA can do this - https://www.nagios.org/ncpa/

./check_ncpa.py -H <ncpa_agent> -t '<your token>' -m 'windowscounters/TCPv4/Connections Esablished' -w 100 -c150

Re: alert for exceeding a set # of ESTABLISHED TCP connectio

Posted: Wed Aug 01, 2018 12:35 pm
by gornm565
I have a check_xi_ncpa in Service management when I create a new service but not check_ncpa. Is that the same thing? Would I need to enable anything in the nsclient to make this work?

Re: alert for exceeding a set # of ESTABLISHED TCP connectio

Posted: Wed Aug 01, 2018 2:27 pm
by cdienger
check_xi_ncpa is just a display name and will call the check_ncpa.py plugin on the backend. The command provided can be run from the /usr/local/nagios/libexec/ directory as test.

nsclient is completely separate(and third party) agent from NCPA. You will need to install NCPA to on the Windows machine to use this check.