Xymon Mailing List Archive search

Connecting the "history" file dots...

4 messages in this thread

list David Mills · Wed, 12 Dec 2012 17:42:47 +0000 ·
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?

Thanks!

david

~~~~~~~~~~~~~~~~~~~
David Mills
Systems Administrator
Northrop Grumman
XXX-XXX-XXXX
user-eb64c112f0e9@xymon.invalid
list Ryan Novosielski · Wed, 12 Dec 2012 12:45:13 -0500 ·
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
quoted from David Mills

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).

- -- 
- ---- _  _ _  _ ___  _  _  _
|Y#| |  | |\/| |  \ |\ |  | |Ryan Novosielski - Sr. Systems Programmer
|$&| |__| |  | |__/ | \| _| |user-ae4522577e16@xymon.invalid - 973/972.0922 (2-0922)
\__/ Univ. of Med. and Dent.|IST/EI-Academic Svcs. - ADMC 450, Newark
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iEYEARECAAYFAlDIwqkACgkQmb+gadEcsb5PtgCghbkewQMx2gO2IxYEX2kRBilW
cOgAoMqoHPwgU/e4f7vC2OM67teq/EV1
=IWqB
-----END PGP SIGNATURE-----
list David Mills · Wed, 12 Dec 2012 17:53:47 +0000 ·
Ah-ha! Thanks, Ryan. I checked your idea against the stamps of the last status changes for that host/test and found this:

$ tail /export/xymon/data/hist/pwmu002.cpu
Mon Nov  5 13:30:54 2012 green 1352143854 2333190
Sun Dec  2 13:37:24 2012 yellow 1354477044 1807		# Turned yellow on "Sun Dec  2 13:37:24 2012"
Sun Dec  2 14:07:31 2012 green 1354478851			# Turned green on "Sun Dec  2 14:07:31 2012"


The "13:37:24" and "14:07:31" stamp corresponds to the time stamps of the last two files in the ".../histlogs/pwmu002/cpu/" file:

ls -rt /export/xymon/data/histlogs/pwmu002/cpu/
signature
<snip>
-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


-----Original Message-----

quoted from Ryan Novosielski
From: Novosielski, Ryan [mailto:user-ae4522577e16@xymon.invalid] Sent: Wednesday, December 12, 2012 11:45 AM
To: Mills, David (IS)
Cc: xymon at xymon.com
Subject: EXT :Re: [Xymon] Connecting the "history" file dots...

-----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).

- --
- ---- _  _ _  _ ___  _  _  _
|Y#| |  | |\/| |  \ |\ |  | |Ryan Novosielski - Sr. Systems Programmer |$&| |__| |  | |__/ | \| _| |user-ae4522577e16@xymon.invalid - 973/972.0922 (2-0922)
\__/ Univ. of Med. and Dent.|IST/EI-Academic Svcs. - ADMC 450, Newark -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iEYEARECAAYFAlDIwqkACgkQmb+gadEcsb5PtgCghbkewQMx2gO2IxYEX2kRBilW
cOgAoMqoHPwgU/e4f7vC2OM67teq/EV1
=IWqB
-----END PGP SIGNATURE-----
list Japheth Cleaver · Wed, 12 Dec 2012 15:36:22 -0800 (PST) ·
quoted from David Mills
-----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