Page 1 of 1

Help on creating Servicedepency

Posted: Sat Aug 25, 2012 3:33 am
by oliwel
Hi All,

I am trying to create a service dependency but it seems not to work.

The setup:
I have a backup server (host_name idefix) which has a seperate partation for a group of virtual servers (host_group vservers).
I have a service check "Space Backup" which checks the resource on the backup host but is assigned to the vserver host. Now, when the backup server goes down, I get a service failure in all of my vserver hosts :/

As it seems to be impossible to nail a service dependency to a host state, I used the "SSH" Service on the backup server as master service, here is the relevant part of the config so far:

Code: Select all

define service {
        use                                    prio3
        hostgroup                          vservers
        servicegroups                     overlays, backup
        normal_check_interval       60
        service_description            Space Backups
        check_command                check_backupspace
        normal_check_interval       60
}

define servicedependency {
        host_name                                idefix
        service_description                   SSH
        dependent_hostgroup_name      vservers
        dependent_service_description  Space Backups
        execution_failure_criteria         c
        notification_failure_criteria      c
}

Current state: I put down the backup server for maintenance, the SSH service is on "CRITICAL" state, the host is in scheduled downtime, so I wont get any notifications from the master host.
Anyway, I get notifications from each host in the vserver group about the failed check on "Space Backup".

What am I doing wrong?

Oliver

Re: Help on creating Servicedepency

Posted: Mon Aug 27, 2012 6:15 pm
by jsmurphy
There's nothing wrong with your servicedependency definition, it all looks good to me... it's pretty much identical to one I have configured myself except I have inherit parents and a dependency period set.

Maybe the problem is more mundane? I hate to ask the obvious but did you restart Nagios? What version of Nagios? It's an interesting problem and I'm not sure how to troubleshoot it.

Re: Help on creating Servicedepency

Posted: Tue Aug 28, 2012 12:59 am
by oliwel
Hi,

the version is 3.3.1 and yes I did restart but it looks like it was just a kind of race condition. I added the depenency AFTER the host went down to get rid of all the alarms and some of them made it, but now the check time stays on the date of the last check and no notifications are send.

As soons as the box is back again, I will simulate a failure and check if it was really that simple.

Oliver

Re: Help on creating Servicedepency

Posted: Tue Aug 28, 2012 4:33 pm
by jsmurphy
Hmmmm that could certainly explain it, if it does turn out to be a race condition might be worth reporting it on the bug tacker: http://tracker.nagios.org/my_view_page.php