For shell based event handlers I normally add these lines to the top of the script:

set -x
exec >> /tmp/event.log 2>&1
echo "================= Started `date` ================"
set

This way, everything the event handler does is written to the file /tmp/event.log

Also, this page: http://edcint.co.nz/checkwmiplus/?q=genericeventhandler
is about a generic event handler which could replace your event handler just by passing it some parameters. The other advantage of the generic event handler is that is has good logging and debug features.

This page: http://edcint.co.nz/checkwmiplus/?q=faq_worksoncommandline
is about plugins that don't work in Nagios but work on the command line. Most of the pointers here also apply to event handlers.

On 28/11/2012 6:16 AM, Assaf Flatto wrote:
On 27/11/12 17:32, fatcha...@gmx.de wrote:
Hi,

I`m using a nagios 3.0.3 on a CentOS 5.8 and I´m a little stuck with a 
eventhandeler problem- I can`t see it running and I can´t find a problem in the 
logfiles. Here a short overview:




--
Smartmon System Monitoring <http://www.smartmon.com.au>
www.smartmon.com.au <http://www.smartmon.com.au>
------------------------------------------------------------------------------
Keep yourself connected to Go Parallel: 
DESIGN Expert tips on starting your parallel project right.
http://goparallel.sourceforge.net
_______________________________________________
Nagios-users mailing list
Nagios-users@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

Reply via email to