Event Handler Question

Mathew Walker lmw94002 at hotmail.com
Thu Jul 28 14:51:15 CEST 2011


May or may not be related... When testing new plugins and scripts, make sure you're testing them as the "nagios" user the scripts will be running as when integrated w/ Nagios.

I documented what I did for a previous employer awhile back here:
http://www.techadre.com/content/nagios-event-handler-restarting-service

Perhaps something in there may be useful.

-- 
Mat W. 

> From: Marcel.Galke at trans4mation.de
> To: nagios-users at lists.sourceforge.net
> Date: Wed, 27 Jul 2011 11:46:18 +0200
> Subject: Re: [Nagios-users] Event Handler Question
> 
> Hey Chris,
> 
> have you taken a look into the Docu and verified that the used macros are available in your context? Have you tried the debug option?
> 
> Marcel
> 
> 
> >From: Chris Zimmerman [mailto:czimmer at wczimmerman.dyndns.org] 
> >Sent: Wednesday, July 27, 2011 12:27 AM
> >To: nagios-users at lists.sourceforge.net
> >Subject: [Nagios-users] Event Handler Question
> >
> >I am having an issue with a very basic event handler on Nagios 3.2.3.  I have the event handler defined with 3 macros: $HOSTSTATE$ $HOSTSTATETYPE$ $HOSTADDRESS$ all passed to a wrapper shell script that takes each macro as $1, $2, and $3.  In the >wrapper script I added some echo statements as part of my troubleshooting to figure out why my script wasn't working.  If I run the script manually and pass the arguments as I expect, the script runs fine.  When Nagios executes it, as verified in the log, >nothing is happening and it is because the first 2 arguments are not being passed to the script.  Interestingly, the third one is passed to the script.  
> >
> >So, what could be the issue with the command definition not passing the first 2 arguments?
> >
> >Thanks,
> >Chris
> 
> ------------------------------------------------------------------------------
> Got Input?   Slashdot Needs You.
> Take our quick survey online.  Come on, we don't ask for help often.
> Plus, you'll get a chance to win $100 to spend on ThinkGeek.
> http://p.sf.net/sfu/slashdot-survey
> _______________________________________________
> 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
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20110728/7a480177/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
-------------- next part --------------
_______________________________________________
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