[hobbit] RRD Tool help

Graham Nayler graham.nayler at hallmarq.net
Thu Oct 9 17:49:47 CEST 2008


James,

(I assume you mean "script" rather than "strip")

I've just gone through this myself. The two main places to look (other than 
the source code) are:
- man page for hobbitd_rrd(8)
- howtograph.html, accessible from the "Custom Graphs" item on the Help menu 
from the hoobit web interface.
...although the information is a bit patchy and diffuse, unless I've missed 
finding the lodestone too.

To get the custom parsing script to run, you need to add
    --extra-script=<myscript> --extra-tests=<comma-separated list of 
test/column names>
to the hobbitd_channel argument list in [rrdstatus] section of 
hobbitlaunch.cfg

Add each test name to TEST2RRD and GRAPH in hobbitserver.cfg

Add a section [<mytest>] to hobbitcgi.cfg

That all handles putting multiple lines on a single graph. If you have 
multiple data lines to display and you want them on individual graphs, then 
the documentation is really sparse. The rest of this reply handles this.

Are you using the NCV module or a custom script to parse the message out? If 
NCV I believe there's something with a "Split_NCV" keyword, but I'm not 
using that myself, as I'm using a custom parsing script. The key here is to 
generate a separate RRD file for each trace, which is not described in the 
docs. The following works

In your parsing script, write the following lines to stdout in order for 
each trace you want to display
DS:<graph_name>:GAUGE...etc (as described in the RRD man page)
<test_name>.<graph_name>.rrd
<value>
The file passed to the script in arg3 is the full text of the message passed 
from the client to hobbit, except for the first line. This is also that 
displayed on the webpage associated with the test.

If the file being parsed contains data for multiple traces, export the above 
3 lines for each trace. This then generates the separate RRD files as named 
in the second line of each 3.

To each testname in GRAPH in hobbitserver.cfg, append two colons then the 
maximum number of traces to display on each graph. E.g.
test_name1::1,test_name2::2
would separate traces for test_name1 to individual graphs, and test_name2 
into pairs.

You also need to tell the system how many traces there are for each test. 
Either you can tell it explicitly, or it attempts to work it out for itself. 
This is not well documented. The automatic detection is really flaky. List 
each test you want to split graphs in "--multigraphs=" in the CGI_SVC_OPTS 
variable in hobbitcgi.cfg. If you do this then you should also include the 
standard elements "disk,inode,qtree,ifmib". It then counts each non-blank 
line in the message, except those starting with a status light (e.g. 
"&green"), and then knocks 1 off the count. The alternative is to tell it 
explicitly. In the script generating the status message (i.e. on the 
client), write into the message the html comment string "<!--  
linecount=number_of_values_in_the_test_message -->. Note that there should 
be exactly 1 space before "linecount". This is what I'm using.

To format the graphs, you write sections in hobbitgraph.cfg, as described in 
the hobbitgraph.cfg man page. You can either write a separate line for each 
trace, or use the replaceable parameters @...@, although I think there's a 
bug in using @RRDPARAM@ to sepcify the parameter name in the DEF lines, 
which I need to report. I've not found a way of specifying different 
definitions for the different graphs.


Graham Nayler


----- Original Message ----- 
From: "Roberts, James" <James.Roberts at hants.gov.uk>
To: <hobbit at hswn.dk>
Sent: Thursday, October 09, 2008 11:33 AM
Subject: [hobbit] RRD Tool help


sorry to bother you but....

Is there an easy walk through on how to add custom strip output to RRD
graphs?


Thanks in advance


James....

To unsubscribe from the hobbit list, send an e-mail to
hobbit-unsubscribe at hswn.dk






More information about the Xymon mailing list