Page 1 of 1

[Nagios-devel] service on hostgroup

Posted: Wed Oct 09, 2002 8:23 am
by Guest
Hi all.

I try to use nagios to monitor about 50 hosts. Theses hosts are always
the same, the only difference is their IP address and their name.
I have grouped these hosts in an hostgroup.
define hostgroup {
name pc-group
members pc1, pc2, pc3, ...
}


I want to test always the same services on each host.

So is there any other solution than writing this (ping-service and
ssh-service are template I created):
define service {
use ping-service
host_name pc1
}

define service {
use ssh-service
host_name pc1
}

define service {
use ping-service
host_name pc2
}

define service {
use ssh-service
host_name pc2
}

define service {
use ping-service
host_name pc3
}

define service {
use ssh-service
host_name pc3
}

...

I was thinking about 2 new (I hope they are new) things :
- a service group that is a set of template services like this :
define servicegroup {
name my-services

members ping-service
members ssh-service
}

define service {
use_group my-services
hostgroup_name pc-group
}

- adding a new entry in the service definition : hostgroup_name.
So the previous lines should be written like this :
define service {
use ping-service
hostgroup_name pc-group
}

define service {
use ssh-service
hostgroup_name pc-group
}

Any plan to implement these ?

If you have any idea for me to reduce the number of config lines, you're
welcome.

Laurent






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