graphing.
list Paul Root
We have a netcool machine that is getting events stuck in it, and we've written a client side script that is run by an automation inside the server. It puts out data like this: Process code of zero - green Events : 198 We want to graph this over time to see if we can see a trend. So I added it to the end of TEST2RRD TEST2RRD="...,xymond,nfmsgw=ncv" And at the end of the file I put NCV_nfmsgw="Events:GAUGE" I restarted xymon, just killing xymond_rrd didn't work for me. I got an rrd file, and it's looking fine: <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE rrd SYSTEM "http://oss.oetiker.ch/rrdtool/rrdtool.dtd"> <!-- Round Robin Database Dump --> <rrd> <version>0003</version> <step>300</step> <!-- Seconds --> <lastupdate>1321402656</lastupdate> <!-- 2011-11-15 18:17:36 CST --> <ds> <name> Events </name> <type> GAUGE </type> <minimal_heartbeat>600</minimal_heartbeat> <min>NaN</min> <max>NaN</max> <!-- PDP Status --> <last_ds>383</last_ds> <value>5.9748000000e+04</value> <unknown_sec> 0 </unknown_sec> </ds> <!-- Round Robin Archives --> <rra> ... So, now however, I'm lost on the actual graph creation. I don't understand the GPRINT lines at all, are they putting in legend or min/max history? Or is it defining the scale of the graph. And I'm not too sure about the DEF line either, what's the keyword AVERAGE saying there? The data is all integer, number of events, do I sti I basically just stole the lines from hobbitd since that's the same sort of data. [nfmsgw] TITLE NFMS Gateway Events YAXIS Unprocessed Events DEF:events=nfmsgw.rrd:Events:AVERAGE LINE2:events#00CCCC:Unprocessed Events GPRINT:events:LAST: \: %5.1lf (cur) GPRINT:events:MAX: \: %5.1lf (max) GPRINT:events:MIN: \: %5.1lf (min) GPRINT:events:AVERAGE: \: %5.1lf (avg)\n Anybody have any help? Thanks, Paul. Paul Root - Engineer III Managed Services Systems - CenturyLink This communication is the property of CenturyLink and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments.
list Christoph Schug
On Tue, 15 Nov 2011 18:24:36 -0600, "Root, Paul" <user-76fdb6883669@xymon.invalid>
▸
wrote:So, now however, I'm lost on the actual graph creation. I don't understand the GPRINT lines at all, are they putting in legend or min/max history?
Or
is it defining the scale of the graph. And I'm not too sure about the DEF
line either, what's the keyword AVERAGE saying there? The data is all
integer, number of events, do I sti
I basically just stole the lines from hobbitd since that's the same sort
of
data.
[nfmsgw]
TITLE NFMS Gateway Events
YAXIS Unprocessed Events
DEF:events=nfmsgw.rrd:Events:AVERAGE
LINE2:events#00CCCC:Unprocessed Events
GPRINT:events:LAST: \: %5.1lf (cur)
GPRINT:events:MAX: \: %5.1lf (max)
GPRINT:events:MIN: \: %5.1lf (min)
GPRINT:events:AVERAGE: \: %5.1lf (avg)\nMost of the graph definition isn't Xymon specific at all but gets simply passed to the RRD library. The GPRINT stuff just adds you some additional lines of text into the graph. See http://oss.oetiker.ch/rrdtool/doc/rrdgraph_graph.en.html for details. This is done several times for the same variable ("value") using different Consolidation Functions. According to http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html there is "AVERAGE": the average of the data points is stored "MIN": the smallest of the data points is stored "MAX": the largest of the data points is stored "LAST": the last data points is used From cosmetic point of view for example you might want to change the "%5.1lf" to "%5.0lf" all except AVERAGE as you stated that you're dealing with integers only. I found it easiest and quickest to trace down errors in the graph definition by just reproducing the stuff on command line. You only need to transform the "TITLE" and "YAXIS" tags into "--title" and "--vertical-label" command line arguments to "rrdtool graph". If the RRD file is not in your current working directory just specify the path to it, if there are any @COLOR@ magic thing (which is not the case in yours) then replace them with something suitable in RGB notations, e.g. "0000ff" or "00ff00". In you case that would be something like $ rrdtool graph /var/tmp/mygraph.png -a PNG \ --title 'NFMS Gateway Events' --vertical-label 'Unprocessed Events' \ 'DEF:events=/path/to/nfmsgw.rrd:Events:AVERAGE' \
▸
'LINE2:events#00CCCC:Unprocessed Events' \
'GPRINT:events:LAST: \: %5.1lf (cur)' \
'GPRINT:events:MAX: \: %5.1lf (max)' \
'GPRINT:events:MIN: \: %5.1lf (min)' \
'GPRINT:events:AVERAGE: \: %5.1lf (avg)\n'
(Note: when doing so, rrdtool graph is pretty picky about whitespace, so be
sure to have the single quote directly before GPRINT and not some space in
between)
If something is wrong, rrdtool should give you an error which might be more
helpful than anything from the logs.
list Paul Root
Thanks for the insight. I got it working.
▸
Paul.
Paul Root - Engineer III
Managed Services Systems - CenturyLink
-----Original Message----- From: Christoph Schug [mailto:user-cd3e90ddf801@xymon.invalid] Sent: Wednesday, November 16, 2011 4:31 AM To: Root, Paul Cc: xymon at xymon.com Subject: Re: [Xymon] graphing. On Tue, 15 Nov 2011 18:24:36 -0600, "Root, Paul" <user-76fdb6883669@xymon.invalid> wrote:So, now however, I'm lost on the actual graph creation. I don't understand the GPRINT lines at all, are they putting in legend or min/max history?Oris it defining the scale of the graph. And I'm not too sure about theDEFline either, what's the keyword AVERAGE saying there? The data is all integer, number of events, do I sti I basically just stole the lines from hobbitd since that's the same sort of data. [nfmsgw] TITLE NFMS Gateway Events YAXIS Unprocessed Events DEF:events=nfmsgw.rrd:Events:AVERAGE LINE2:events#00CCCC:Unprocessed Events GPRINT:events:LAST: \: %5.1lf (cur) GPRINT:events:MAX: \: %5.1lf (max) GPRINT:events:MIN: \: %5.1lf (min) GPRINT:events:AVERAGE: \: %5.1lf (avg)\nMost of the graph definition isn't Xymon specific at all but gets simply passed to the RRD library. The GPRINT stuff just adds you some additional lines of text into the graph. See http://oss.oetiker.ch/rrdtool/doc/rrdgraph_graph.en.html for details. This is done several times for the same variable ("value") using different Consolidation Functions. According to http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html there is "AVERAGE": the average of the data points is stored "MIN": the smallest of the data points is stored "MAX": the largest of the data points is stored "LAST": the last data points is used From cosmetic point of view for example you might want to change the "%5.1lf" to "%5.0lf" all except AVERAGE as you stated that you're dealing with integers only. I found it easiest and quickest to trace down errors in the graph definition by just reproducing the stuff on command line. You only need to transform the "TITLE" and "YAXIS" tags into "--title" and "--vertical-label" command line arguments to "rrdtool graph". If the RRD file is not in your current working directory just specify the path to it, if there are any @COLOR@ magic thing (which is not the case in yours) then replace them with something suitable in RGB notations, e.g. "0000ff" or "00ff00". In you case that would be something like $ rrdtool graph /var/tmp/mygraph.png -a PNG \ --title 'NFMS Gateway Events' --vertical-label 'Unprocessed Events' \ 'DEF:events=/path/to/nfmsgw.rrd:Events:AVERAGE' \ 'LINE2:events#00CCCC:Unprocessed Events' \ 'GPRINT:events:LAST: \: %5.1lf (cur)' \ 'GPRINT:events:MAX: \: %5.1lf (max)' \ 'GPRINT:events:MIN: \: %5.1lf (min)' \ 'GPRINT:events:AVERAGE: \: %5.1lf (avg)\n' (Note: when doing so, rrdtool graph is pretty picky about whitespace, so be sure to have the single quote directly before GPRINT and not some space in between) If something is wrong, rrdtool should give you an error which might be more helpful than anything from the logs.
This communication is the property of CenturyLink and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments.