Excluding a hostgroup from a service check
Edward Trochim
ejtrochim at alaska.edu
Thu Apr 9 18:58:48 CEST 2009
I have a service template that specifies several host groups and one
host to check. One of the services that inherits this template should
not be executed by one of the host groups defined. I read the object
tricks documentation page and found that I could include a ! before
the name in a hostgroup_name definition in the service definition to
exclude that hostgroup from that service. However, when I do that
nagios excludes all hostgroups from the list from running that service.
That explanation of the problem might be a little thick so here is an
abbreviated example.
I have a service template like this:
define service{
name standard-check
use generic-service
hostgroup_name hostgroup1, hostgroup2, hostgroup3,\
hostgroup4, hostgroup5, hostgroup6,\
hostgroup7
host_name host1
servicegroups standard_checks
register 0
}
And a service definition like this. I want to exclude hostgroup5 from
this one service definition:
define service{
use standard-check
hostgroup_name !hostgroup5
service_description Disk Space
}
Instead of doing what I want this excludes every hostgroup defined in
the template. host1 still gets the service though.
I am currently running nagios version 3.0.6.
Is this a bug in nagios or am I misunderstanding the way this should
behave?
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list