hostgroups in service definitions
Pulyankote, Gopinath
Gopinath_Pulyankote at affymetrix.com
Wed Nov 27 19:17:24 CET 2002
It work for me.
Hope this helps:
-------------------------------------------
>From Hostgroup.cfg file:
define hostgroup {
hostgroup_name unix-servers
alias UNIX Servers
contact_groups unix-admins
members srvr1,srvr2,srvr3
}
-------------------------------------------
>From Services.cfg file:
define service {
use generic-service ; Name of service
template to use
hostgroup_name unix-servers
service_description DISK
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 20
retry_check_interval 5
contact_groups unix-admins
notification_interval 240
notification_period 24x7
notification_options c,r
check_command rcheck_all_disks!none
}
-------------------------------------------
-----Original Message-----
From: Rasmus Plewe [mailto:rplewe at ess.nec.de]
Sent: Wednesday, November 27, 2002 9:25 AM
To: Nagios users list
Subject: [Nagios-users] hostgroups in service definitions
Hello,
I'm trying to set up Nagios for an (in the end) fairly large and
complex network. I haven't used Nagios/Netsaint before, but with the
documentation and the FAQ I got a pretty good start, at least for the
not large and complex test bed.
My problem:
My logical thinking tells me that in a "define service{}" I should be
able to insert a hostgroup, with the result that this service would be
defined on all hosts in the hostgroup (as I have a couple of basically
identical hosts). This does not seem to work.
What I have done:
- I used
host_name mygroup
in the service definition. Result when running nagios -v:
Error: Host 'my_group' specified in service 'SMTP' not defined anywhere!
- I used
host_group my_group
in the service definition. Result when running nagios -v:
Error: Could not add object property in file '[...]/services.cfg' on line
x.
- I used
host_name host1,host2,host3
in the service definition. This seems to work.
What more did I do:
- I read the documentation regarding service definition (again) and
looked for other places in the documentation that could be of help.
- I read and searched the FAQ.
- I tried to search the mailing list archive. Unfortunately the search
funktion was either stalling or time out-ing, more or less.
I'm sure it must be some tiny overseeing on my side, as I would expect
this to be in the FAQ if it was really neccessary to list all
computers seperately - what would be the point of hostgroups then, and
it would be quite error prone when adding/deleting hosts.
Regards,
Rasmus
-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T
handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T
handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
More information about the Users
mailing list