Odd behavior adding passive service

Chris Hector chector at Currenex.com
Wed Sep 7 01:05:25 CEST 2005


My goal is to add a service to an existing active nagios implementation
that will catch traps and send email alerts based on severity. I've got
the SNMP part working fine but am having trouble with the nagios portion.

I've added a service definition similar to:

# Warning SNMP traps
define service{
        service_description     TRAPWARN
        hostgroup_name          network-devices
        use                     generic-service
        is_volatile             1
        active_checks_enabled   0
        passive_checks_enabled  1
        max_check_attempts      1
        normal_check_interval   31536000
        notification_interval   0
        notification_options    c
        check_command           passive_check_ok
}

This works fine for the traps but causes nagios to schedule the active
checks based on the normal_check_interval here even though it is
explicitely defined in the generic-service definition, it schedules all
the active checks to run one year later instead of the 3 minutes that
was defined in the template

eg.
define service{
       name                     generic-service
       ...
       normal_check_interval    3
}

When I remove the normal_check_interval the behavior is as expected.

What I want is an initial passive check based on some very small script
to set it as ok instead of pending using an active check, then set the
normal_check_interval to some very long period of time so it isn't run
again for say a month or year after, and handle passive trap handling
normally

I know an alternative is to disable the active check and simple send a
submit_check_result for each IP that I'm monitoring but I was going to
use this for additional functionality later.


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
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