[Nagios-devel] Empty hostgroup check in the configuration arbitrary

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
Guest

[Nagios-devel] Empty hostgroup check in the configuration arbitrary

Post by Guest »

Hello,

I have many nagios servers for different regions in the world, and I
want to create a standard installation with a set of hostgroups,
commands, and services with default thresholds, for all my Nagios
admins. My services are applied to hostgroups, and I want to add a
check to a host only by adding this host to the relevant hostgroup.

Example :
- I define a command check_dns
- I define a hostgroup dns-server-hostgroup
- I define a service check_dns applied to dns-server-hostgroup

Then I define a host, and if it's a DNS server, I add it to the DNS
hostgroup (I'm running Nagios 3):
define host {
....
hostgroups +dns-server-hostgroup
}

This works very well in my configuration except that if I install a
nagios server in a new region, and they not have for example a NFS
server, I will get an error because nfs-server-hostgroup is empty. I
fixed this by adding "register 0" to the service definition, but that
means the admins have to comment out this line to enable the check on
the hostgroup.

So I would like to be allowed to create checks on empty hostgroups,
and of course if the hostgroup is empty, no check is done.

Is there something technically in the nagios core that prevents
creating empty hostgroups or is it an arbitrary configuration check
because it's assumed that a user probably doesn't want to check a
service on a empty hostgroup ?

I find this configuration approach very convenient so I hope it's the
second answer ! :-)

Thanks in advance !
--
L.B.





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked