Hello,
Using Xymon 4.3.7, if I use the 'xymon' command and specify a status lifetime, as mentioned in the man page, is there anywhere on the server that I can see what the lifetime is? That is, the date/time when the status should expire. I'm assuming it must be held somewhere in order for Xymon to know when to expire it :-)
Thanks,
John.
-- John Horne Tel: +44 (0)1752 587287 Plymouth University, UK Fax: +44 (0)1752 587001
I don't recall seeing that on a xymon web page, but it's available from the command line:
xymon localhost "xymondboard fields=hostname,testname,validtime"
validtime is the unix timestamp in seconds when the status is no longer valid. Past that time, it turns purple. Subtract that from "date +%s" and divide by 60 to get minutes.
Ralph Mitchell
On Wed, May 9, 2012 at 9:53 AM, John Horne <john.horne at plymouth.ac.uk>wrote:
Hello,
Using Xymon 4.3.7, if I use the 'xymon' command and specify a status lifetime, as mentioned in the man page, is there anywhere on the server that I can see what the lifetime is? That is, the date/time when the status should expire. I'm assuming it must be held somewhere in order for Xymon to know when to expire it :-)
Thanks,
John.
-- John Horne Tel: +44 (0)1752 587287 Plymouth University, UK Fax: +44 (0)1752 587001
Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon
On Wed, 2012-05-09 at 10:36 -0400, Ralph Mitchell wrote:
I don't recall seeing that on a xymon web page, but it's available from the command line:
xymon localhost "xymondboard fields=hostname,testname,validtime"validtime is the unix timestamp in seconds when the status is no longer valid. Past that time, it turns purple. Subtract that from "date +%s" and divide by 60 to get minutes.
Thanks for this. However, what I think I need is to see where the 'validtime' is actually stored.
I'm getting a little odd situation where if I send a status with a lifetime, then send a second status with a shorter lifetime, when that second one expires I then get a purple report. I *think* that is what is happening, I'm still testing it but getting a bit confused. I'll probably need to start from scratch (with a green status) tomorrow.
The above xymon command shows that when the second lifetime expires the (reported) lifetime suddenly becomes the current time rather than the first lifetime or even the current time plus 30 mins. Hence, I would like to see what is actually being stored.
John.
-- John Horne Tel: +44 (0)1752 587287 Plymouth University, UK Fax: +44 (0)1752 587001
On Wed, 2012-05-09 at 10:36 -0400, Ralph Mitchell wrote:
I don't recall seeing that on a xymon web page, but it's available from the command line:
xymon localhost "xymondboard fields=hostname,testname,validtime"validtime is the unix timestamp in seconds when the status is no longer valid. Past that time, it turns purple. Subtract that from "date +%s" and divide by 60 to get minutes.
Thanks for this. However, what I think I need is to see where the 'validtime' is actually stored.
IIRC, this is in a structure that exists entirely in memory. It's checkpointed every 15m (by default) in xymond.chk in your tmpdir, so you could retrieve it from there if you need to. You can also send xymond a USR1 signal to force an immediate checkpoint.
I'm getting a little odd situation where if I send a status with a lifetime, then send a second status with a shorter lifetime, when that second one expires I then get a purple report. I *think* that is what is happening, I'm still testing it but getting a bit confused. I'll probably need to start from scratch (with a green status) tomorrow.
The above xymon command shows that when the second lifetime expires the (reported) lifetime suddenly becomes the current time rather than the first lifetime or even the current time plus 30 mins. Hence, I would like to see what is actually being stored.
I believe xymond will always use the most-recent TTL for a status report as canon. To wit: "The last report I got said to expect something else within XX minutes."
Regards,
-jc
On Wed, 2012-05-09 at 14:53 +0100, John Horne wrote:
Hello,
Using Xymon 4.3.7, if I use the 'xymon' command and specify a status lifetime, as mentioned in the man page, is there anywhere on the server that I can see what the lifetime is? That is, the date/time when the status should expire. I'm assuming it must be held somewhere in order for Xymon to know when to expire it :-)
Thanks for all the replies.
Yes, it does seem that the lifetime data is held in memory, but xymond does maintain a checkpoint file (the man page has a couple of options about this). Yes, sending a USR1 signal to xymond forces an update of the checkpoint file. So by simply grepping for 'host.service' in the checkpoint file shows me the actual 'status' command received.
It turns out that in some instances my program was sending a status with a negative lifetime! In that respect Xymon was doing the right thing in that the status had already expired, so it showed purple as if no status had been received.
John.
-- John Horne Tel: +44 (0)1752 587287 Plymouth University, UK Fax: +44 (0)1752 587001
participants (3)
-
cleaver@terabithia.org
-
john.horne@plymouth.ac.uk
-
ralphmitchell@gmail.com