[Xymon] Reporting

J.C. Cleaver cleaver at terabithia.org
Thu Mar 26 22:27:51 CET 2015



On Wed, March 25, 2015 6:35 pm, Colin Coe wrote:
> Hi all
>
> I've been asked to report on the usage of some devices (Windows 7
> tablet computers).  I have not installed any agents but I've had them
> in the hosts.cfg file for a couple of months.
>
> All I need is to report on which devices have a 'conn' max of 0ms over
> 7, 14 and 28 days.
>
> Any ideas how I can get this info in text format?
>


Well, it's definitely not *pretty*, but this (taken mostly from:
http://stackoverflow.com/questions/15964917/get-a-max-number-in-a-certain-period-from-a-rrd-file)
seemed to get the output needed from the raw RRD files:


[rhel6-x86-64 rrd]# for i in `ls */tcp.conn.rrd` ; do  echo -n "${i} " ;
rrdtool graph x -s `date +%s --date="1 week ago"` DEF:v=${i}:sec:MAX
VDEF:vm=v,MAXIMUM PRINT:vm:%lf ; done | perl -pe 's/0x0\s/= /sg' | sort
-nr -k 3
centos3-i386.build/tcp.conn.rrd = 0.264434
b.resolvers.Level3.net/tcp.conn.rrd = 0.135559
centos4-i386.build/tcp.conn.rrd = 0.126232
rhel5-i386.build/tcp.conn.rrd = 0.118713
google-public-dns-a.google.com/tcp.conn.rrd = 0.063940
ns1.google.com/tcp.conn.rrd = 0.063380
a.resolvers.Level3.net/tcp.conn.rrd = 0.049894
google-public-dns-b.google.com/tcp.conn.rrd = 0.035567
rhel5-x86-64.build/tcp.conn.rrd = 0.016195

etc...

That's a list of everything, then just filter out numerically as needed.
(Uses GNU date, but can be substituted with any epoch start/end points.)


This is definitely an area where Xymon could use some improvement. The
hostgraphs.cgi(1) script is a start, but there's a lot at the display
layer that could be done to gather interesting data from RRD for
searching, filtering, and report presentation.


HTH,

-jc




More information about the Xymon mailing list