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