I have some exceptions as far as groups are concerned which need to have
a specific monitor added. I don't want to create a new host group.
I could define the service in the services.cfg one for each host, but I am
looking to take up less space in the file.
Currently:
define service {
service_description abcabcabc
host_name a
check_command some_command!some!para!meters
use some-service
}
And I have several hosts to do.
Attempts to make the above
host_name a,b
to cover the 2 hosts with the service have failed.
So I am asking, what is the best way for 2-3 hosts to do the above?
I tried various ideas
host_name a,b
and two
host_name a
host_name b
But nothing seemed to really do it. I've ended up doing two define services one
for each host, instead of creating arbitrary hostgroups which it will eventually be,
obviously.
how to monitor just a few hosts
Re: how to monitor just a few hosts
I'm a bit confused. Are you just trying to assign a single service identically to multiple hosts? If so, you just give a comma-separated list of hostnames:
host_name: This directive is used to specify the short name(s) of the host(s) that the service "runs" on or is associated with. Multiple hosts should be separated by commas.
Former Nagios employee