Service dependencies based on servicegroups

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Service dependencies based on servicegroups

Post by eloyd »

What am I missing here?

I make a service SVC-X-1. I inherit a service template ST-X. ST-X inherits service template ST-cmd which has the command definitions on it. ST-cmd inherits also adds a servicegroup SG-base. ST-cmd then inherits ST-X-host which has the hostgroup HG-X on it. So we have a base service definition with all the commands, arguments, and hosts identified via service templates and hostgroups. Service template ST-X also adds a service group called SG-X. Now SVC-X-1 is in SG-base and SG-X, runs on the hosts specified in HG-X, and runs the command specified in ST-cmd. Repeat this for SVC-X-2 through SVC-X-9 for a total of 9 of these service checks (just for the sake of argument). Now do again for Y and Z so you end up with SG-X, SG-Y, and SG-Z.

So far, no service is assigned to a host, hostgroup, or servicegroup directly. Here comes the problem.

Now we want to make SVC-X-* dependent upon SVC-Agent. So we head to service dependencies and make Host-X our dependent host, and SVC-Agent our dependent service. Then we make Host-X our non-dependent host and all of the SG-* servicegroups that we created as part of this.

It doesn't pass config test muster. Complains that it can't expand the servicegroup_name and won't let me make servicegroups dependent on up a service. Here's the resulting config entry:

Code: Select all

define servicedependency {
    # config_name                    NRPE Checks
    dependent_host_name              SVGP-d01.smartvox.net
    dependent_service_description    NRPE Server
    host_name                        host-X.everwatch.global
    inherits_parent                  1
    execution_failure_criteria       c,
    notification_failure_criteria    c,
    dependency_period                24x7
    servicegroup_name                SG-1,SG-2,SG-3
}
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Service dependencies based on servicegroups

Post by tgriep »

Try this, enable the Inherit from parents option for this and see if it works for you.

To truly test this out, we would need to see all of the configurations so it you can post them, that will help.
Also, run the verbose verification to get more details on what is failing.

Code: Select all

/usr/local/nagios/bin/nagios -vvv /usr/local/nagios/etc/nagios.cfg
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked