<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'><div dir='ltr'>
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.<br><br>I documented what I did for a previous employer awhile back here:<br>http://www.techadre.com/content/nagios-event-handler-restarting-service<br><br>Perhaps something in there may be useful.<br><br>-- <br>Mat W. <br><br><div>> From: Marcel.Galke@trans4mation.de<br>> To: nagios-users@lists.sourceforge.net<br>> Date: Wed, 27 Jul 2011 11:46:18 +0200<br>> Subject: Re: [Nagios-users] Event Handler Question<br>> <br>> Hey Chris,<br>> <br>> 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?<br>> <br>> Marcel<br>> <br>> <br>> >From: Chris Zimmerman [mailto:czimmer@wczimmerman.dyndns.org] <br>> >Sent: Wednesday, July 27, 2011 12:27 AM<br>> >To: nagios-users@lists.sourceforge.net<br>> >Subject: [Nagios-users] Event Handler Question<br>> ><br>> >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.  <br>> ><br>> >So, what could be the issue with the command definition not passing the first 2 arguments?<br>> ><br>> >Thanks,<br>> >Chris<br>> <br>> ------------------------------------------------------------------------------<br>> Got Input?   Slashdot Needs You.<br>> Take our quick survey online.  Come on, we don't ask for help often.<br>> Plus, you'll get a chance to win $100 to spend on ThinkGeek.<br>> http://p.sf.net/sfu/slashdot-survey<br>> _______________________________________________<br>> Nagios-users mailing list<br>> Nagios-users@lists.sourceforge.net<br>> https://lists.sourceforge.net/lists/listinfo/nagios-users<br>> ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. <br>> ::: Messages without supporting info will risk being sent to /dev/null<br></div>                                     </div></body>
</html>