Page 1 of 1

RE: [Nagios-devel] service on hostgroup

Posted: Wed Oct 09, 2002 10:21 pm
by Guest
Theres two ways to do it;

'host_name pc1,pc2,pc3'

or=20

'hostgroup_name pc-group'

in the service-definition



/FredrikW

-----Original Message-----
From: Laurent Vaills [mailto:[email protected]]
Sent: Wed 09-Oct-02 18:23
To: [email protected]
Cc:=09
Subject: [Nagios-devel] service on hostgroup

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=20
host_name pc1
}

define service {
use ssh-service
host_name pc1
}

define service {
use ping-service=20
host_name pc2
}

define service {
use ssh-service
host_name pc2
}

define service {
use ping-service=20
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.=20
So the previous lines should be written like this :
define service {
use ping-service
hostgroup_name pc-group
}=20

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

Any plan to implement these ?

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

Laurent



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Nagios-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/lis ... gios-devel








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