Page 1 of 1
Add the ability to group hosts based off of ip address
Posted: Mon Mar 10, 2014 12:37 am
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?
Re: Add the ability to group hosts based off of ip address
Posted: Sat Jun 21, 2014 8:44 pm
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.