<div dir="ltr">I ran xymon/server/bin/xymoncmd  your_script.sh which works for me (the easiest way :-) )<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, May 3, 2013 at 1:04 PM, Norbert Kriegenburg <span dir="ltr"><<a href="mailto:norbert.kriegenburg@de.ibm.com" target="_blank">norbert.kriegenburg@de.ibm.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
what I always include in my scripts is a test mode snippet:<br>
<br>
# Test-Mode ?<br>
# TEST=0 => works in cooperation with Xymon agent (default)<br>
# TEST=1 => for testing, results to stdout ("TEST=1 ./bb-testname.sh")<br>
# TEST>1 => for testing, but sending results to Xymon server manually<br>
TEST=${TEST:-"0"}<br>
if [ "$TEST" != "0" ]<br>
then<br>
  # if TEST mode, we have to manually set the env<br>
  BBHOME="$HOME/xymon/server"<br>
  . $BBHOME/etc/xymonserver.cfg<br>
  BBQUERYCMD=$BB<br>
  [ "$TEST" = "1" ] && BB="echo"<br>
fi<br>
<br>
(based on my old BB scripts, read BBHOME=XYMONHOME)<br>
Then I can easy do all manual testing with<br>
TEST=1 $HOME/ext/testscript.sh<br>
for stdout, and with TEST=2 for direct send to xymon server, if you want to<br>
update the status manually, or check the html output.<br>
(one line, no semicolon!)<br>
<br>
Norbert<br>
<br>
<br>
<br>
<br>
From:   Ralph Mitchell <<a href="mailto:ralphmitchell@gmail.com">ralphmitchell@gmail.com</a>><br>
To:     Paul Root <<a href="mailto:Paul.Root@centurylink.com">Paul.Root@centurylink.com</a>>,<br>
Cc:     <a href="mailto:xymon@xymon.com">xymon@xymon.com</a><br>
Date:   05/03/2013 01:26 AM<br>
<div class="im">Subject:        Re: [Xymon] manually running custom script not changing the<br>
            status<br>
</div>Sent by:        <a href="mailto:xymon-bounces@xymon.com">xymon-bounces@xymon.com</a><br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
You can set up the environment properly by prefixing the script with<br>
xymoncmd.  E.g.<br>
<br>
/home/xymon/server/bin/xymoncmd  your_script,sh<br>
<br>
Ralph Mitchell<br>
On May 2, 2013 12:40 PM, "Root, Paul T" <<a href="mailto:Paul.Root@centurylink.com">Paul.Root@centurylink.com</a>> wrote:<br>
<br>
Well, if it runs outside of xymon, and that’s how we do most of our custom<br>
scripts, then you need to make sure your environment is correct. So that<br>
the script knows the pertinent xymon information.<br>
<br>
<br>
<br>
Did you possibly run the script as yourself vs root, and so it couldn’t<br>
read the xymonclient.cfg file or something?<br>
<br>
<br>
<br>
Without details and/or output of your hand running of the script, we can<br>
only guess. My guess is that you either didn’t have path to the xymon<br>
command or you didn’t have the server ip right in that command.<br>
<br>
<br>
<br>
From: deepak deore [mailto:<a href="mailto:deepakdeore2004@gmail.com">deepakdeore2004@gmail.com</a>]<br>
Sent: Thursday, May 02, 2013 9:35 AM<br>
To: Root, Paul T<br>
Cc: <a href="mailto:xymon@xymon.com">xymon@xymon.com</a><br>
Subject: Re: [Xymon] manually running custom script not changing the status<br>
<br>
<br>
<br>
ohh, forgot to mention. The script is set on client side so not related to<br>
tasks.cfg<br>
<br>
<br>
<br>
On Thu, May 2, 2013 at 6:58 PM, Root, Paul T <<a href="mailto:Paul.Root@centurylink.com">Paul.Root@centurylink.com</a>><br>
wrote:<br>
<br>
If you are running the script from tasks.cfg. You probably want to use<br>
xymoncmd to run the script, so you’ll get the proper environment.<br>
<br>
<br>
<br>
From: <a href="mailto:xymon-bounces@xymon.com">xymon-bounces@xymon.com</a> [mailto:<a href="mailto:xymon-bounces@xymon.com">xymon-bounces@xymon.com</a>] On Behalf Of<br>
deepak deore<br>
Sent: Thursday, May 02, 2013 8:20 AM<br>
To: <a href="mailto:xymon@xymon.com">xymon@xymon.com</a><br>
Subject: [Xymon] manually running custom script not changing the status<br>
<br>
<br>
<br>
I have a script which runs after 24 hrs interval, if we get an alert we<br>
work on it and after resolving the issue I tried to run that custom script<br>
manually but it didnt change the status into green.<br>
<br>
I had to wait until its next run, i.e. after 24 hrs.<br>
<br>
How can I run the custom script before its next run time which will change<br>
the xymon status if the issue is resolved?<br>
<br>
<br>
<br>
_______________________________________________<br>
Xymon mailing list<br>
<a href="mailto:Xymon@xymon.com">Xymon@xymon.com</a><br>
<a href="http://lists.xymon.com/mailman/listinfo/xymon" target="_blank">http://lists.xymon.com/mailman/listinfo/xymon</a><br>
_______________________________________________<br>
Xymon mailing list<br>
<a href="mailto:Xymon@xymon.com">Xymon@xymon.com</a><br>
<a href="http://lists.xymon.com/mailman/listinfo/xymon" target="_blank">http://lists.xymon.com/mailman/listinfo/xymon</a><br>
_______________________________________________<br>
Xymon mailing list<br>
<a href="mailto:Xymon@xymon.com">Xymon@xymon.com</a><br>
<a href="http://lists.xymon.com/mailman/listinfo/xymon" target="_blank">http://lists.xymon.com/mailman/listinfo/xymon</a><br>
</div></div></blockquote></div><br></div>