non sticky passive checks

Getchell, Kristoffer M K.Getchell at kingston.ac.uk
Fri Jan 8 12:00:09 CET 2010


Hi

Could you enable freshness checking and set the check command to something that sets the status to critical (for example you could write an external command into the external command queue)?  So long as passive results were received within the freshness threshold, the check command won't be executed, so the status you see will be what is reported by the passive check result.  If no passive check results are received you will then be notified of a critical situation as the freshness check command would then be executed and return a critical alert.

To this end, I would redefine your passive service command as follows:

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
	check_freshness        	        1
	freshness_threshold		  300
	check_command		        issue_critical_alert	; this command is run only if the service results are "stale"
}

Kind regards,




Kris







From: Pankaj [mailto:penguinhead at gmail.com] 
Sent: 08 January 2010 07:30
To: Nagios Mailinglist
Subject: [Nagios-users] non sticky passive checks

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 )

This email has been scanned for all viruses by the MessageLabs Email
Security System.

This email has been scanned for all viruses by the MessageLabs Email
Security System.

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