Exclude host checks


Hi Forum,

We have an existing 3.0.5 installation with NDO, NRPE, NagVis, PNP4Nagios that works just fine.
We have a large grid with around 100 servers that we would like to be able to powerdown when the grid is idle and power up again when we experience more load on the grid.

I need to be able to exclude hostchecks on these gridservers in nagios preferably in a etc/objects/exclude.cfg file containing only lines of hostnames.

Anyone had experience with similar configurations ?
How do i do this the best way ?

Thanks in advance


I can’t say this is something I’ve ever had cause to do, but if it were me, I’d probably put your 100 hosts into their own hostgroup, and using the ‘external commands’ function ( nagios.sourceforge.net/docs/3_0/extcommands.html ) write a couple of scripts to enable and disable the hostgroup’s host and service checks, using
DISABLE_HOSTGROUP_HOST_CHECKS - nagios.org/developerinfo/ext … mand_id=86
DISABLE_HOSTGROUP_SVC_CHECKS - nagios.org/developerinfo/ext … mand_id=84
ENABLE_HOSTGROUP_HOST_CHECKS - nagios.org/developerinfo/ext … mand_id=85
ENABLE_HOSTGROUP_SVC_CHECKS - nagios.org/developerinfo/ext … mand_id=83

Or something like that anyway.




Thanks for your reply,

I forgot to mention though, that it would be any one/several host who are not running any jobs when the grid load is low that we want to power down.
Unfortunately we can’t use the HostGroup/solution that you describe…

Best regards


Ah right you are then. Well, if it still holds true that the hostnames of the powered-down servers will be in a list, you can script it if you like, and feed in your list of hostnames, but you’ll have to submit host and service check enabling/disabling individual commands for each host…
DISABLE_HOST_CHECK - nagios.org/developerinfo/ext … mand_id=54
DISABLE_HOST_SVC_CHECKS - nagios.org/developerinfo/ext … mand_id=34
ENABLE_HOST_CHECK - nagios.org/developerinfo/ext … mand_id=53
ENABLE_HOST_SVC_CHECKS - nagios.org/developerinfo/ext … mand_id=33


That works just perfectly - case closed…
Thanks a lot !