Both the tasks.cfg and clientlaunch.cfg source in the xymon environment so any processes that are called they have access to the Xymon environement variables. Your shell likely does not have access to those variables. So when you run your script manually from the shell, if you are using the $XYMON, $XYMSRV, and $MACHINE environment variables in your script, the script will not have access to those variables.
In other words, the following command only works if called by xymon, not if executed from a shell:
$XYMON $XYMSRV "status $MACHINE.$COLUMN $COLOR date
My suggestion would be to add logic to the beginning of your script testing to make sure the $XYMON variable is not blank. If it is blank, come up with a way to set those variables, either by hard coding them, or by getting them from another location.
Michael Beatty
On 05/02/2013 10:35 AM, deepak deore wrote:
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 <mailto: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> [mailto: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 <mailto: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