non sticky passive checks

Assaf Flatto nagios at flatto.net
Fri Jan 8 10:46:18 CET 2010


Pankaj wrote:
> Hi,
>
> I've configured passive service checks and am reporting back the 
> results using nsca. I would like to turn the alerts to be critical 
> after 5 minutes if the monitored servers fail to send any results. 
> Currently the check continues to remain in the last state. How can I 
> achieve this?
>
> >>>>>>>>>>> service_common.cfg
>  define service{
>                 use                    generic_service
>                 name                   passive_service
>                 active_checks_enabled  0
>                 passive_checks_enabled 1                               
>                 flap_detection_enabled 0
>                 register               0                               
>                 is_volatile            0
>                 check_period           24x7
>                 max_check_attempts     1
>                 normal_check_interval  5
>                 retry_check_interval   1
>                 check_freshness        0
>                 contact_groups         admins 
>                 check_command          check_dummy!0
>                 notification_interval  120
>                 notification_period    24x7
>                 notification_options   w,u,c,r
>                 stalking_options       w,c,u
> }
>
> define service {
>                 use                             passive_service
>                 service_description       HW Sensors
>                 hostgroup_name                  hgp_webservers, 
> hgp_db, hgp_search, hgp_image
>                 check_command                   check_dummy
>                 active_checks_enabled           0
>                 passive_checks_enabled          1
> }
>
> define command{
>         command_name check_dummy
>         command_line $USER1$/check_dummy $ARG1$
> }
>
>
> -- 
> ( 2b || ! 2b )
>   

One way to do this is to add an active check from your central nagios to 
the remote nagios machine ( standard check_host_alive  should do the 
trick)  and if that machine is not responding for the time you define as 
bad , then trigger an event handler that "expires" the results supplied 
by that server .

Assaf





------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
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