[Xymon] CPU Average for 1 month via CLI

Norbert Kriegenburg norbert.kriegenburg at de.ibm.com
Fri Mar 1 19:03:57 CET 2019


There is no way to get this directly afaik.
But you can extract those values from your rrd files with the start and end
arg with rrdtool.

For example to get the average load for a server for the last 15 days just
do:

rrdtool fetch la.rrd AVERAGE -s now-15d -e now | gawk '!/nan/{sum+=$2};END
{printf("Average load: %.1f\n",sum/NR)}'

For a bunch of servers loop like this

for server in $list
do
  rdtool fetch $XYMONRRDS/$server/la.rrd AVERAGE -s now-15d -e now|gawk
'!/nan/{sum+=$2};END{printf("Average load server %s: %.1f
\n","'"$server"'",sum/NR)}'
done

Norbert



From:	Bill Howe <howe.bill at gmail.com>
To:	Xymon Mailing List <xymon at xymon.com>
Date:	03/01/2019 04:55 PM
Subject:	[Xymon] CPU Average for 1 month via CLI
Sent by:	"Xymon" <xymon-bounces at xymon.com>



Hello,

Is anyone aware of a way to generate reports via the CLI that show, for
example, a host's CPU average over the last 30 days?

I can get the data in graph form via the xymon web portal's "Metrics
Reports" page, but need to gather this data point for a large number of
hosts.

I also looked at the manpage for 'xymon', and xymondboard appears to gather
current stats, but I didn't see a way to gather a date range.

Thank you,

Bill Howe
howe.bill at gmail.com_______________________________________________
Xymon mailing list
Xymon at xymon.com
https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.xymon.com_mailman_listinfo_xymon&d=DwIGaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=1okcrdQDEUvhgFMv7NgYfuq4YGCugFBVqzoTP_MCY98&m=LGSjDiQr5uMUWbaSRNZefbi91CXHpFZrkxyScTU_lJg&s=73T5zFtsxwfJiNScF_ekl7_eMkHWY2cy6pV0L7CmTWc&e=



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20190301/c30838d7/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20190301/c30838d7/attachment.gif>


More information about the Xymon mailing list