best way to determine if the Xymon server just started?
list David W Gore
I have several server side scripts that give me results I would rather not have soon after a Xymon server restart. What is the best way to determine if Xymon just started? I could poke around a bit, just wondered if someone already had some ideas already implemented. I will do something like exit 1 If xymon just started, otherwise continue. ~David
list Josh Luthman
Just look at the hobbitd column. Goes yellow for 5 minutes when it restarts and says... Latest errormessages: Loading hostnames Loading saved state Setting up network listener on 0.0.0.0:1984 Setting up signal handlers Setting up hobbitd channels Setting up logfiles Setup complete Josh Luthman Office: XXX-XXX-XXXX Direct: XXX-XXX-XXXX XXXX Wayne St Suite XXXX Troy, OH XXXXX On Thu, Nov 18, 2010 at 12:25 PM, Gore, David W
▸
<user-3e5761c68b56@xymon.invalid> wrote:I have several server side scripts that give me results I would rather not have soon after a Xymon server restart. What is the best way to determine if Xymon just started? I could poke around a bit, just wondered if someone already had some ideas already implemented. I will do something like exit 1 If xymon just started, otherwise continue. ~David
list David W Gore
Ok, I could just do this in the script: xymon 0 "xymondboard host=xymon1 test=xymond color=green" As long as that returns green then execute the script. Thanks for the hint Josh. ~David
-----Original Message----- From: Josh Luthman [mailto:user-4c45a83f15cb@xymon.invalid] Sent: Thursday, November 18, 2010 17:36 To: xymon at xymon.com Subject: Re: [xymon] best way to determine if the Xymon server just started?
▸
Just look at the hobbitd column. Goes yellow for 5 minutes when it restarts and says... Latest errormessages: Loading hostnames Loading saved state Setting up network listener on 0.0.0.0:1984 Setting up signal handlers Setting up hobbitd channels Setting up logfiles Setup complete Josh Luthman Office: XXX-XXX-XXXX Direct: XXX-XXX-XXXX XXXX Wayne St Suite XXXX Troy, OH XXXXX On Thu, Nov 18, 2010 at 12:25 PM, Gore, David W <user-3e5761c68b56@xymon.invalid> wrote:I have several server side scripts that give me results I would rather not have soon after a Xymon server restart. What is the best way to determine if Xymon just started? I could poke around a bit, just wondered if someone already had some ideas already implemented. I will do something like exit 1 If xymon just started, otherwise continue. ~David
list Tim McCloskey
You can tail the hobbitlaunch.log to get that data too. Tim
▸
From: Gore, David W [user-3e5761c68b56@xymon.invalid]
Sent: Thursday, November 18, 2010 9:25 AM
To: xymon at xymon.com
Subject: [xymon] best way to determine if the Xymon server just started?
I have several server side scripts that give me results I would rather not have soon after a Xymon server restart. What is the best way to determine if Xymon just started? I could poke around a bit, just wondered if someone already had some ideas already implemented. I will do something like exit 1 If xymon just started, otherwise continue.
~David
list Henrik Størner
▸
In <user-32fba4a0be9e@xymon.invalid> "Gore, David W" <user-3e5761c68b56@xymon.invalid> writes:
I have several server side scripts that give me results I would rather not have soon after a Xymon server restart. What is the best way to determine if Xymon just started? I could poke around a bit, just wondered if someone already had some ideas already implemented. I will do something like exit 1 If xymon just started, otherwise continue.
Check the timestamp of the PID file. #!/bin/sh touch --date="1 hour ago" /tmp/1hourago if test $XYMONSERVERLOGS/xymond.pid -nt /tmp/1hourago then echo "Xymon restarted less than 1 hour ago" exit 0 fi Probably requires the GNU version of "touch" . Regards, Henrik