Odd behavior adding passive service

Fred f1216 at yahoo.com
Wed Sep 7 05:47:21 CEST 2005


I had tried something similar, basically, a passive check definition
for some static information such as memory size, # of processors, physical
location, etc stuff that doesn't change.   My attempt was to define the
service in nagios and then when I start the nagios service (service nagios
start) I wait till nagios is up and ready then run my plug-in from the
service start script to populate the passive info.  That worked, sortof.
The problem was that once I do this on a larger system where I configure
distributed monitoring the services timeout and go stale, then I lose the
data.   I wound up creating an active service on one node that runs the
plug-in that populates the data for the other nodes.  I wind up scheduling
this active service to run once a day ... even though the data is static
and will never change or result in a non-OK status.  It does allow for
nodes to come and go and not have to restart nagios to see the changes,
although. 

Since you mention submit_check_result, I'm assuming you are setting up
some kind of distributed monitoring setup.  

It would be a nice enhancement to allow a hook when a node comes back up
after being down (via host-check), as you could then re-run any static
services such as this.


--- Chris Hector <chector at Currenex.com> wrote:

> 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
> 







-------------------------------------------------------
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