Hi, I've moved from NSCLient++ to NC_NET and trying to get the external scripts working.
I've created an event_handler in the nagios config, I've created the script and the script is run when the service goes up or down. However teh script stops and restarts all of the relevant services. I only want this to happen when the service is down, however Nagios runs it when it changes state (which I believe is correct behaviour). >From reading the Nagios docs, external scripts must be able to take the following parameters $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$, and I was going to use one of them to check the state (ie. If it is critical, stop and start the services, if it's not, then don't). however I'm unsure how to pass this to the external script through NC_NET. In the Nagios log, the following is shown === SERVICE EVENT HANDLER: BLUDCSHIG001;Exchange Services;OK;HARD;3;run_remote_script!"restartexchange.cmd $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$" === I've redirected the args in the .cmd file running on the Windows machine to a text file so I can see them and nothing is being passed. Any ideas? Any other ways to do this? Kind regards, Paul Broadwith MBCS Blue Ivy Ltd - Microsoft Small Business Specialist, UK Partner Qualified for 2007 Tel.: 0800 612 0601 Windows Messenger: [EMAIL PROTECTED] Web: http://www.blueivy.co.uk ---------------------------------------------------------------------------------------------------------------------------------------------- Blue Ivy Limited is a limited company registered in Scotland. Registered company number: SC 221649. Registered VAT number: GB 774 8460 88. Registered Office: 67 Kelburn Street, Barrhead, Glasgow, G78 1LD This message and any associated files is intended only for the use of nagios-users@lists.sourceforge.net and may contain information that is confidential, subject to copyright or constitutes a trade secret. If you are not nagios-users@lists.sourceforge.net you are hereby notified that any dissemination, copying or distribution of this message, or files associated with this message, is strictly prohibited. If you have received this message in error, please notify [EMAIL PROTECTED] immediately by replying to the message and then deleting it from your computer. Any views or opinions presented are solely those of the author [EMAIL PROTECTED] and do not necessarily represent those of the company. ---------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ 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