[Xymon] Connecting the "history" file dots...

cleaver at terabithia.org cleaver at terabithia.org
Thu Dec 13 00:36:22 CET 2012



> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 12/12/2012 12:43 PM, Mills, David (IS) wrote:
>> Hi, All!
>>
>> In poking around my data directory, I see a listing like this for
>> the “cpu” test data for one of my hosts:
>>
>> $  ls -rt /export/xymon/data/histlogs/pwmu002/cpu/ total 61
>> drwxr-xr-x  22 hobbit   monitor       22 Dec 30  2010 ../
>> -rw-r--r--   1 hobbit   monitor     1.9K Feb 17  2012
>> Fri_Feb_17_00:30:59_2012 -rw-r--r--   1 hobbit   monitor     1.9K
>> Feb 17  2012 Fri_Feb_17_01:51:10_2012 -rw-r--r--   1 hobbit
>> monitor     1.9K Feb 25  2012 Sat_Feb_25_09:41:40_2012 -rw-r--r--
>> 1 hobbit   monitor     1.9K Feb 25  2012 Sat_Feb_25_12:52:12_2012
>> -rw-r--r--   1 hobbit   monitor     1.9K Jun 24 10:21
>> Sun_Jun_24_10:21:19_2012 -rw-r--r--   1 hobbit   monitor     1.8K
>> Jun 24 11:19 Sun_Jun_24_11:19:10_2012 -rw-r--r--   1 hobbit
>> monitor     1.8K Jun 24 11:54 Sun_Jun_24_11:54:21_2012 -rw-r--r--
>> 1 hobbit   monitor     1.9K Nov  5 12:41 Mon_Nov_5_12:40:58_2012
>> -rw-r--r--   1 hobbit   monitor     1.9K Nov  5 13:30
>> Mon_Nov_5_13:30:54_2012 -rw-r--r--   1 hobbit   monitor     1.9K
>> Dec  2 13:37 Sun_Dec_2_13:37:24_2012 -rw-r--r--   1 hobbit
>> monitor     1.9K Dec  2 14:07 Sun_Dec_2_14:07:31_2012
>>
>> Each of these files is some sort of snapshot of the data displayed
>> when you click on the “cpu” icon for the indicated host in Xymon.
>>
>> Why then, is the most recent data file a couple weeks old but the
>> data displayed for the “cpu” icon is current on the screen?
>
> My immediate guess is because it has been green for a couple of weeks,
> and the "current" status is accessed a different way (not using
> history files).
>


"Current status" is kept in memory by xymond (subject to periodic
checkpoint-file creation), but not natively stored anywhere.

When a status-change occurs, the "stachg" channel gets a message. In the
normal, case, xymond_history listens on that channel and writes out the
status log as appropriate. That means you'll get the first "green" status
detail, but nothing more (until it changes, when you'll get the first
status in the new color).

This was one of the improvements hobbit/xymon had over the old Big
Brother, and significantly cut down on load on the server itself.

If you really want the most recent status saved to disk, enable the
[storestatus] stanza in tasks.cfg. A better solution is usually simply to
read it straight from xymond. e.g.:

> xymon $XYMSRV "xymondlog host=pwmu002 test=cpu"


HTH,

-jc




More information about the Xymon mailing list