servicegroup_name in dependencies

Andy Shellam (Mailing Lists) andy.shellam-lists at mailnetwork.co.uk
Sun Feb 4 12:46:25 CET 2007


Can anyone see a problem with this service dependency setup?  Nagios 
complains with a "NULL service description/host name in service 
dependency definition" message with this configuration, but I cannot see 
anything wrong myself.

According to the manual:

--- start man quote ---
All Services In Multiple Servicegroups: If you want to create service 
dependencies for all services
that belong in one or more servicegroups, you can do use the 
servicegroup_name and/or dependent_
servicegroup_name directive as follows:

define servicedependency{
servicegroup_name SERVICEGROUP1,SERVICEGROUP2,...,SERVICEGROUPN
dependent_servicegroup_name SERVICEGROUP3,SERVICEGROUP4,...SERVICEGROUPN
other escalation directives ...
}
--- end man quote ---

I cannot get this to work under Nagios 2.7.

In my setup, I have a group called "aseu_web_servers."  Every host in 
that group (currently only one) has a service called "Web Service" 
which, using NRPE, checks that the local web server is running.
I then have a list of 13 websites assigned to a service group called 
"web_sites".

What I'm trying to do is setup a dependency on every website, with the 
"Web Service" on the host being the master service, so if the web server 
dies, I don't get a notification for every website that fails.

With the above manual excerpt, I figured the following would work:

define servicedependency {
    hostgroup_name            aseu_web_servers
    service_description        Web Service
    dependent_hostgroup_name    aseu_web_servers
    dependent_servicegroup_name    web_sites
    inherits_parent            0
    execution_failure_criteria    c
    notification_failure_criteria    w,u,c,p
}

Config check fails with: "NULL service description/host name in service 
dependency definition"

If I change "dependent_servicegroup_name" to 
"dependent_service_description" and put a single website in, instead of 
the "web_sites" group, it works, as follows:

define servicedependency {
    hostgroup_name            aseu_web_servers
    service_description        Web Service
    dependent_hostgroup_name    aseu_web_servers
    dependent_service_description     Website: www.andyshellam.eu
    inherits_parent            0
    execution_failure_criteria    c
    notification_failure_criteria    w,u,c,p
}

Config check results in "Total Warnings: 0; Total Errors:   0"

Even if I set a specific host name instead of a host group, it still 
complains whenever the "dependent_servicegroup_name" option is used.

This means I'll have to add in a service dependency for every website.  
I cannot use a wildcard in the "dependent_service_description" because 
there are other services on those servers that don't have a dependency 
on the web server.  If I add a new website, all I want to have to do is 
add it into the "web_sites" group and have everything else taken care 
of, which the manual says you can by using the 
"dependent_servicegroup_name" directive.

Is this a bug in Nagios, or can anyone tell me I'm missing something silly?

Thanks

Andy.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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