[Xymon] SCRIPT running twice
Ampinder Singh
ampinder.singh at hotmail.com
Thu Dec 10 19:37:27 CET 2015
Hello,
I'm having an issue here. I want to run an external script in Xymon. So i follow the docs.
I'm trying to run a test script that will for now just to an echo to a logfile.
Here is what I have done.
* In analysis.cfg
HOST=qcdvap1096
LOG /home/xymon/client4.3.17/logfile "testword"
* In client-local.cfg
[qcdvap1096]
log:/home/xymon/client4.3.17/logfile:2048
trigger error
#The logfile is on the client
* In alerts.cfg
HOST=qcdvap1096 SERVICE=msgs COLOR=red,purple
#MAIL ampinder.singh at cgi.com COLOR=red REPEAT=2h
#SCRIPT /home/xymon/server/scripts/connect.sh MAIL ampinder.singh at cgi.com COLOR=red
SCRIPT /home/xymon/server/scripts/connect.sh MAIL ampinder.singh at cgi.com COLOR=red
I have created my test script on the server:
#Name of the script: connect.sh
#!/bin/bash
#This script on the server where Xymon is installed will call another script ont the client (qcdvap1096)
ssh xymon at 142.101.131.45 /home/xymon/client4.3.17/ext/test.sh
This is my script on the client (qcdvap1096) that gets called
#!/bin/bash
#Name of the script: test.sh
#Working line
#echo "it's down again" >> /home/xymon/client4.3.17/loggenerated.txt
echo "`date` "Server" "went" "out"" >> /home/xymon/client4.3.17/ampinder.txt
So I manually add the word "testword" on logfile and it works my script gets called. But my only issue is that the script gets run twice. Like a second of eachother
Here is the output of the log generated (/home/xymon/client4.3.17/loggenerated.tx)
Thu Dec 10 13:12:55 EST 2015 Server went out
Thu Dec 10 13:12:56 EST 2015 Server went out
I dont know why it runs twice. I only want it to run once. As soon, it's see the word "testword" it should run it once.
Could you please help me resolve this issue?
Thanks
Ajay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20151210/39f67b6f/attachment.html>
More information about the Xymon
mailing list