Monitor Host with 1000 Ports ...Ideas?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
mikew
Posts: 243
Joined: Sun Feb 05, 2012 7:05 pm

Monitor Host with 1000 Ports ...Ideas?

Post by mikew »

I am trying to help a company evaluate how to monitor a single host with 1000 TCP port connections. The uniqueness of this situation is how to reduce the load on that host and still get adequate monitoring. Here are several of the apects we have examined:

1. NRPE Indirect Checks
Because of structure NRPE Indirect checks were the first choice. This means that Nagios connects to HostA which connects to HostB and executes the 1000 checks.

2. SNMP with extend Scripts

We looked at this option which made the setup much more complex and had a more complex troubleshooting issue. It probably reduces network bandwidth but really the same checks will be run on the host so not many advantages.

3. NRDS

NRDS has the biggest advantage of reducing the load on Nagios. However, it still does not reduces the host with 1000 tcp port checks.

So, I am looking for ideas as this is kind of a unusual situation....any thought would be helpful at this point.
Mike Weber

Nagios Training/Consulting
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Monitor Host with 1000 Ports ...Ideas?

Post by BanditBBS »

Mike,

Help me understand better what you are wanting. Are you wanting to check the 1000 TCP connections or are you wanting to run random checks on it but want to make sure and use the lowest cpu utilization method?
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Monitor Host with 1000 Ports ...Ideas?

Post by tmcdonald »

Do you *need* 1,000 separate services? Or would a single service work that just reports how many ports are open/closed? Does each port have a unique method of checking or are they all the same? Is this for alerting or just informational?
Former Nagios employee
User avatar
mikew
Posts: 243
Joined: Sun Feb 05, 2012 7:05 pm

Re: Monitor Host with 1000 Ports ...Ideas?

Post by mikew »

This is 1000 separate ports on one host that all need to be checked, 1000 separate checks.

Check Specifics:
* 1000 separate checks on one host, all different TCP checks
* 1000 separate checks that need to trigger alerts if they are not up
* bandwidth usage (perf data) not required
* these are spefiic checks that are connects to storage
Mike Weber

Nagios Training/Consulting
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Monitor Host with 1000 Ports ...Ideas?

Post by sreinhardt »

Honestly an nmap or check_tcp\udp to the host with those services would not be terribly difficult on either the host or nagios system, especially provided you only need to make sure they are open and they get separated out through standard nagios scheduling.

Otherwise my suggestion, write a script that runs on a cron or agent, calls netstat and has a condition for each port(maybe a port:service name:expected connection config to import) as it looks through netstat output, it reports passively back to nagios with each service name, port state, and number of active connections(if you care). This should result in a fairly quick and light script that can be modified to handle any additional ports in the future. Just my take though, someone else could come up with something better!
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
User avatar
mikew
Posts: 243
Joined: Sun Feb 05, 2012 7:05 pm

Re: Monitor Host with 1000 Ports ...Ideas?

Post by mikew »

Thanks, those ideas make sense, especially with the issue of trying to protect resources on the host.
Mike Weber

Nagios Training/Consulting
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Monitor Host with 1000 Ports ...Ideas?

Post by sreinhardt »

You're welcome! If you do go the script route and can share, I'd love to see what you came up with.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked