[Xymon] graphing problem
Michael Beatty
Michael.Beatty at sherwin.com
Wed Apr 17 14:10:41 CEST 2013
The problem is most certainly that your data is coming in at 10 minute
intervals. The RRD files are created to have a step of 300 seconds and
a heartbeat of 600 seconds. This means that rrd expects a new data
point every 300 seconds (5 minutes) and if it doesn't get a new data
point withing 600 seconds (10 minutes) it considers the data junk and
disregards it. Typically, this is set to be double the step, so if you
miss one, its okay, but if you miss 2 it returns NaN (Not a Number),
there is nothing to stop you from going larger. Since your data is
coming in every 10 minutes, it is in violation of your heartbeat and the
data is being ignored.
I have asked around before and didn't get a solid answer as to if there
is a better way to do it, but I have worked out a way to fix this. If
there is a better way, please let me know!
There are two places you need to tweak, first is in xymonserver.cfg.
You need to fully define your NCV value for that RRD.
You have:
NCV_internet="google:GAUGE,businessspectator:GAUGE,bloomberg:GAUGE"
When an rrd file is created it is in the following format:
dataSourceName:dataSourceType:heartbeat:min_value:max_value
So, your NCV value should be fully defined as:
NCV_internet="google:GAUGE:1200:0:U,businessspectator:GAUGE:1200:0:U,bloomberg:GAUGE:1200:0:U
This will create your 3 datasets, all of type GAUGE with a 1200 (double
your 10 minute test) with a 0 for a minimum expected value and an
"U"nlimited maximum value.
Next, you need to set your rrddefinition.cfg to set the "step" to
override the default 300 second value. Since your script runs every 10
minutes, it should be 600. To do this, put a "-s" parameter in your
rrddefinition
[internet]
-s 600
RRA:AVERAGE:0.5:1:576
One thing to note, while you can change the heartbeat on the fly, the
step is permanent. Once the file is created, changing your
rrddefinition.cfg won't change the RRD file. As long as you are still
in development, every time you make a change, just delete the rrd file
and let xymon create a new one, it will set the step you have defined in
rrddefinition.cfg. If you aren't in development and do not want to
loose the data you currently have, the only option I know you have is to
export the rrd using "rrdtool dump" to an XML file, manually edit the
STEP of that file, then do an "rrdtool restore" to convert that XML back
into an rrd.
Here is a link to the rrd man page, its a good read.
http://oss.oetiker.ch/rrdtool/doc/rrdgraph.en.html
Michael Beatty
On 04/16/2013 09:48 PM, Phil Crooker wrote:
> I'm a graphing newbie and can't get the graph to work. Could anyone
> please help? This is to measure internet latency, the test is called
> "internet". This is running over four hosts, so we should be getting
> four sets of graphs. The rrd file is created, but I just see NaN
> values, no data is being recorded.
> many thanks, Phil
> I've got the following data coming in from an ext script every 10 mintues:
> google : 0.15
> businessspectator : 1.28
> bloomberg : 0.05
> -------------------------------------
> I set this up as a gauge graph. Here is one of the entries:
> <ds>
> <name> google </name>
> <type> GAUGE </type>
> <minimal_heartbeat> 600 </minimal_heartbeat>
> <min> NaN </min>
> <max> NaN </max>
> <!-- PDP Status -->
> <last_ds> U </last_ds>
> <value> 0.0000000000e+00 </value>
> <unknown_sec> 172 </unknown_sec>
> </ds>
> ----------------------------------------------------
> Here are the config files.
> in xymonserver.cfg:
> I added this to the GRAPHS string: internet=ncv
> and put in this line after that
> NCV_internet="google:GAUGE,businessspectator:GAUGE,bloomberg:GAUGE"
> -------------------------------------
> graphs.cfg:
> [internet]
> TITLE Internet Latency
> YAXIS Seconds
> DEF:google=internet.rrd:google:GAUGE
> DEF:businessspectator=internet.rrd:businessspectator:GAUGE
> DEF:bloomberg=internet.rrd:bloomberg:GAUGE
> LINE2:google#00CCCC:Inode cache
> LINE2:businessspectator#FF0000:Dentry cache
> LINE2:bloomberg#00FF00:In
> COMMENT:Time to load home page in seconds.\n
>
>
> _______________________________________________
> Xymon mailing list
> Xymon at xymon.com
> http://lists.xymon.com/mailman/listinfo/xymon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20130417/f3f9885c/attachment.html>
More information about the Xymon
mailing list