FW: Using service dependencies

Deborah Martin Deborah.Martin at Kognitio.com
Mon Nov 14 18:34:26 CET 2005


 
-----Original Message-----
From: Deborah Martin 
Sent: 14 November 2005 17:25
To: 'nagios-users at lists.sourceforge.net'
Subject: Using service dependencies 


Hi, 
 
I'm trying to use service dependencies as part of my nagios config. 
 
Basically, I want to do 2 checks, the primary check connects to a database.
The secondary check is for RAM usage. 
However, if the primary check fails I don't want nagios to try and attempt
the secondary check as there is no point if 
a system is down. I still want to see Nagios alert via the web front-end but
not be notified via email when the primary check 
is in a Unknown or Critical state. 
 
(The plugins on their own all work fine thru nagios as do they via the
command-line. )
 
I've defined below what I understand to be the way to configure dependencies
but i'm not convinced its right even though 
it works fine. Could someone take a look and just sanity check this for me
and let me know if i'm doing the right/wrong thing ? 
 
thx
deborah 
PS All of the lines below currently sit in my services.cfg until I know it
works and then i'll split the dependency to a different cfg file. 
Its easier to make changes that way! 
 
 
# device1 Primary check
define service{
        use                     generic-service            ; Name of host
template to use
        host_name               ngcp4
        service_description     device1 DB Check
        is_volatile                     0
        check_period                    24x7
        max_check_attempts              3
        normal_check_interval           5
        retry_check_interval            1
        contact_groups                  linux-admins
        notification_interval           20
        notification_period             24x7
        notification_options            u,c,r
        check_command           check_wx2_conn!dummy$!device1
        }
 
# device1 Secondary check
define service{
        use                     generic-service
        host_name               ngcp4
        service_description     DB RAM checks for device1
        is_volatile             0
        check_period            24x7
        max_check_attempts      3
        normal_check_interval   5
        retry_check_interval    1
        contact_groups          linux-admins
        notification_interval   5
        notification_period     24x7
        notification_options    u,w,c,r
        check_command           check_wx2_ram!$HOSTALIAS$
        }
 
# device1 dependency checks
define servicedependency{
        host_name                       ngcp4
        service_description             DB RAM checks for device1
        dependent_host_name             ngcp4
        dependent_service_description   device1 DB Check
        execution_failure_criteria      u,c
        notification_failure_criteria   u,c
        }
 
 
Regards,
Deborah

************************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. Any unauthorised distribution or copying is strictly 
prohibited.

Whilst Kognitio Limited takes steps to prevent the transmission of 
viruses via e-mail, we can not guarantee that any email or 
attachment is free from computer viruses and you are strongly
advised to undertake your own anti-virus precautions.

Kognitio grants no warranties regarding performance,
use or quality of any e-mail or attachment and undertakes no 
liability for loss or damage, howsoever caused.
***********************************************************************

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20051114/982da428/attachment.html>


More information about the Users mailing list