Event Handlers

Mike Lindsey mike-nagios at 5dninja.net
Wed Feb 3 23:01:12 CET 2010


Marc Powell wrote:
> On Feb 3, 2010, at 8:16 AM, Jeff wrote:
> 
>> I have a service that needs to be monitored every minute.  I need some help understanding how services go from soft to a hard state
> 
> When a service check results in a non-OK state, services go from a Soft to a Hard state when they reach max_check_attempts. http://nagios.sourceforge.net/docs/3_0/statetypes.html
> 
>> and if an event handler can be run after a service has gone into a hard state. 
> 
> Only for it's initial Hard problem state or initial Hard recovery state. http://nagios.sourceforge.net/docs/3_0/eventhandlers.html
> 
>> I'm sure everyone has a very dynamic and custom environment to some extent.  I have event handlers that will not run if a lock file is present (cause i am deploying code or so other scripts do not step on each other).  So I for this service that I monitor every minute, I have Max Retries set to 3, Check Interval is 1, and retry interval is 1.  Can someone help shed some light on how I can get an event handler to run again after a service has gone into a hard state?
> 
> You can't really... The only real facility nagios has to do this (that I can think of right now) is is_volatile (http://nagios.sourceforge.net/docs/3_0/objectdefinitions.html#service) but that's probably overkill for your needs; particularly the notification implications.

The other possibility for having something run every time the service is 
checked, is to configure your ocsp_command.

Not exactly what it's generally used for, but it'll do in a pinch.

-- 
Mike Lindsey

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
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