Page 1 of 1

Monitoring ports

Posted: Tue Dec 15, 2015 3:03 pm
by gabrotherton
How do I use Nagios XI to monitor specific ports?

For instance, I know the service httpd normally will listen for connections on port 80 and port 443, and Nagios XI is already monitoring the httpd service. How do I configure Nagios XI to check the state of a specific port? Say, if port 5666 changes from ESTABLISHED to TIME_WAIT (or simply just changes), what is available for Nagios XI so that will show up in the Operations Center view?

Re: Monitoring ports

Posted: Tue Dec 15, 2015 5:44 pm
by tgriep
Would the check_tcp plugin work for you?
check_tcp
This plugin tests TCP connections with the specified host (or unix socket).

Usage:
check_tcp -H host -p port [-w <warning time>] [-c <critical time>] [-s <send string>]
[-e <expect string>] [-q <quit string>][-m <maximum bytes>] [-d <delay>]
[-t <timeout seconds>] [-r <refuse state>] [-M <mismatch state>] [-v] [-4|-6] [-j]
[-D <warn days cert expire>[,<crit days cert expire>]] [-S <use SSL>] [-E]

Re: Monitoring ports

Posted: Wed Dec 16, 2015 3:30 pm
by gabrotherton
I'll give this a try on our dev set and post the results. This is something I was looking for, so thank you!

Re: Monitoring ports

Posted: Wed Dec 16, 2015 3:34 pm
by rkennedy
Sounds good, I'll leave this thread open for now. Let us know the results and if you have any more questions!