Service dependencies not disabling notifications

C. Bensend benny at bennyvision.com
Mon Apr 16 04:38:04 CEST 2007


Hey folks,

   I could swear I've asked this before, but neither Google nor the
mailing list archives showed any posts.  My apologies if this is
indeed a repeat, my memory flakes out sometimes.

   I have a v2.8 installation on an OpenBSD machine.  It was built
from source, not installed via packages/ports.

   I have another OpenBSD machine called electron:


# 'electron' host definition
define host{
        use                     generic-host
        host_name               electron
        alias                   OpenBSD workstation - electron
        address                 electron.bennyvision.com
        check_command           check-host-alive
        max_check_attempts      15
        notification_interval   0
        notification_period     none
        notification_options    d,u,r
        contact_groups          admins-email
        }


It's just a workstation, I don't care as much if it's offline as if it's
online and something's broken, hence the 'notification_period 0'. I have
three services set up, that are checked via NRPE:


# Service definition
define service{
        use                             generic-service
        host_name                       electron
        service_description             clamd
        is_volatile                     0
        check_period                    24x7
        max_check_attempts              6
        normal_check_interval           3
        retry_check_interval            1
        contact_groups                  admins-email
        notification_interval           240
        notification_period             24x7
        notification_options            w,u,c,r
        check_command                   check_procs_nrpe!1:1!clamd }

# Service definition
define service{
        use                             generic-service
        host_name                       electron
        service_description             freshclam
        is_volatile                     0
        check_period                    24x7
        max_check_attempts              6
        normal_check_interval           3
        retry_check_interval            1
        contact_groups                  admins-email
        notification_interval           240
        notification_period             24x7
        notification_options            w,u,c,r
        check_command                   check_procs_nrpe!1:1!freshclam }

# Service definition
define service{
        use                             generic-service
        host_name                       electron
        service_description             freshclam log
        is_volatile                     0
        check_period                    24x7
        max_check_attempts              6
        normal_check_interval           3
        retry_check_interval            1
        contact_groups                  admins-email
        notification_interval           240
        notification_period             24x7
        notification_options            w,u,c,r
        check_command                   check_freshclam_log_nrpe
        }


Basically, I'm checking to make sure clamd and freshclam are running, and
that freshclam is actually updating it's log file, respectively. These all
work just fine, NRPE is executing the checks, it all works. I get notified
just fine if I kill a service or NRPE, and I get the recovery emails as
well when I start them back up.  Yay.

However, I want to set up service dependencies for NRPE on this and all my
other hosts, so if something weird happens to it, I don't get spanked by a
gazillion alerts for each service.  This shouldn't be that difficult, but
I cannot for the life of me get service dependencies working as I think
they should.

I have three service dependencies set up for electron:


# Servicedependency definition
define servicedependency{
        host_name                       electron
        service_description             nrpe
        dependent_host_name             electron
        dependent_service_description   clamd
        execution_failure_criteria      w,u,c,p
        notification_failure_criteria   w,u,c,p
        }

# Servicedependency definition
define servicedependency{
        host_name                       electron
        service_description             nrpe
        dependent_host_name             electron
        dependent_service_description   freshclam
        execution_failure_criteria      w,u,c,p
        notification_failure_criteria   w,u,c,p
        }

# Servicedependency definition
define servicedependency{
        host_name                       electron
        service_description             nrpe
        dependent_host_name             electron
        dependent_service_description   freshclam log
        execution_failure_criteria      w,u,c,p
        notification_failure_criteria   w,u,c,p
        }


nagios -v is happy with this, it does not complain about any config
errors.  However, if I kill NRPE on electron, I get an alert for
each of the supposedly dependent services.  I am absolutely at a
loss to see why.

I have been through /nagios/docs/xodtemplate.html#servicedependency a
gazillion times - what in the heck am I missing?  No matter what options I
give for *_failure_criteria, I cannot get the dependency to NOT alert me
when NRPE is down on electron.

This is driving me nuts.  If someone could point out where I'm going
wrong, I'd _really_ appreciate it.

Thanks much!

Benny


-- 
I've said it before and I'll say it again: If I ever catch a spammer, I
will hang him upside down with rusty barbed wire by his nether-regions
over a pit of rabid lawyers who haven't eaten in days...
                                                  -- Benjamin A. Shelton





-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
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