Add the ability to group hosts based off of ip address

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
thenocguy
Posts: 1
Joined: Mon Mar 10, 2014 12:26 am

Add the ability to group hosts based off of ip address

Post by thenocguy »

One thing that I really would love nagios to be capable of is host groups using the address attribute defined when creating a new host. For instance based on a particular block of IP addresses we know they are in a certain location and if that site goes offline instead of doing host groups from their short name it would be nice to just downtime a block of IP's that existed in a regex group. Thoughts?
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Add the ability to group hosts based off of ip address

Post by eloyd »

I'm a big believer that Nagios is a framework that should be expanded upon to suit people's needs. Writing commands to the nagios.cmd file (see API documentation) is really easy. So you could very easily generate an event handler that triggered when any of your IP group machines fails that sends nagios.cmd the appropriate commands to disable checks on the other machines in the same address group. Flip this around for recovery, and you've got an automatic gizmo that disables your whole monitoring should one thing fail, and then enables it again should it recover.

Add some nagios config file parsing (very easily JSONed) and you could even control it externally and just say "disable all machines with /.*web..*/" to use your regex idea.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
Locked