Re: [Nagios-users] Event Handler Question
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.ga...@trans4mation.de To: nagios-users@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:czim...@wczimmerman.dyndns.org] Sent: Wednesday, July 27, 2011 12:27 AM To: nagios-users@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@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 -- 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@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
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:czim...@wczimmerman.dyndns.org] Sent: Wednesday, July 27, 2011 12:27 AM To: nagios-users@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@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
Re: [Nagios-users] event handler question (if event handler is what I need?)
Marc Thank you... the documentation is very good and it answered all my questions about event handler... And it works now... thanks again -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marc Powell Sent: Tuesday, June 10, 2008 15:03 Cc: Nagios Users Mailinglist Subject: Re: [Nagios-users] event handler question (if event handler is what I need?) On Jun 10, 2008, at 4:09 AM, Yaniv wrote: Hello Nagios users Hello! Please send to this list using text/plain e-mail. Sending HTML does not-so-wonderful things for the archives and for users who receive the list via digest. I am new to nagios and have a question about event handlers. (if event handler is what I need?) Yes, that sounds like just what you need. I would like a script that I have located at /root/scripts/test.sh to be executed if the hard drive get's to the warning state and critical state. Perfect, even down to running a script on the nagios box. Very straigtforward. How would I do that? http://nagios.sourceforge.net/docs/3_0/eventhandlers.html -- Marc - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ 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 No virus found in this incoming message. Checked by AVG. Version: 8.0.100 / Virus Database: 270.2.0/1493 - Release Date: 09/06/2008 17:25 - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ 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
Re: [Nagios-users] event handler question (if event handler is what I need?)
On Jun 10, 2008, at 4:09 AM, Yaniv wrote: Hello Nagios users Hello! Please send to this list using text/plain e-mail. Sending HTML does not-so-wonderful things for the archives and for users who receive the list via digest. I am new to nagios and have a question about event handlers… (if event handler is what I need?) Yes, that sounds like just what you need. I would like a script that I have located at /root/scripts/test.sh to be executed if the hard drive get’s to the warning state and critical state… Perfect, even down to running a script on the nagios box. Very straigtforward. How would I do that? http://nagios.sourceforge.net/docs/3_0/eventhandlers.html -- Marc - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ 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