[hobbit] [PATCH] hobbitgraph.cgi: adding support for stack (Was: [hobbit] ganglia-style graph aggregation with hobbit)
Gildas Le Nadan
gn1 at sanger.ac.uk
Tue Nov 7 10:57:10 CET 2006
Hello,
As far as I understand, you want to add up all the values for the hosts in your
group and display a single graph instead of a stack of multiple graphs.
The @STACKIT@ stanza was not designed for that, but is designed to graph the
relative contribution of each host in the resulting graph.
For your need, I see 2 different options:
1- You create an external script that store the value in a separate rrd and graph it
2- You do the calculations each time you do the rendering, using rrdtool 1.2.
There seems to be ways in rrdtool 1.2 to do that, but it seem that you'll have
to use the IF operator to populate your value for the first entry. I've seen
examples somewhere but I don't remember where.
In case 2, I strongly recommend that you do all the tests manually (i-e not by
modifying hobbitgraph.conf) as it is far easier to figure out what the problem
is. Once you have a working solution, you can figure out how to adapt it to hobbit.
Cheers,
Gildas
Tom Georgoulias wrote:
> Gildas Le Nadan wrote:
>
>> BEWARE: this patch has been tested on a machine with rrdtool 1.0.x.
>> The values/behavior for rrdtool 1.2.x were taken from the online rrd
>> documentation so they are hopefully correct. If someone was able to
>> test it for me on a server with rrdtool 1.2, I would be very grateful!
>
> I'm a little late on testing this, so hopefully this patch is still the
> latest version.
>
> I have tested the patch with Hobbit 4.2.0 + all-in-one patch and rrdtool
> 1.2.15. It seems to work fine, although I am not seeing data presented
> in the way that I had expected it to look. I want to use the RRD stack
> to store values taken from the rrd for each host in a given group, then
> get an average of those stored values which is a single data point that
> represents the host group as a whole.
>
> I've been experimenting with a version of the la1-multi definition, but
> I haven't gotten anything to work yet and I'm rather certain that my
> syntax is off in a few places. I thought I'd email it out anyway, in
> case I can get some pointers or have someone let me know that it won't
> work.
>
>
> TITLE Farm CPU Utilitization
> YAXIS % Used
> FNPATTERN vmstat.rrd
> -u 100
> -r
> DEF:cpu_idl at RRDIDX@=@RRDFN@:cpu_idl:AVERAGE
> CDEF:hostcpu at RRDIDX@=100,cpu_idl at RRDIDX@,-
> # need a way to push each hostcpu at RRDIDX@ onto the stack
> CDEF:cpuavgs=hostcpu at RRDIDX@,AVERAGE
> # then get an average of all the values on the stack
> # using something like COUNT as the num of items in the stack
> CDEF:pbusy=cpuavgs1,cpuavgs2,cpuavgs3,COUNT,AVG
> # graph the final data point
> LINE2:pbusy#ccccff:%CPU
> GPRINT:pbusy:LAST: \: %5.1lf (cur)
> GPRINT:pbusy:MAX: \: %5.1lf (max)
> GPRINT:pbusy:MIN: \: %5.1lf (min)
> GPRINT:pbusy:AVERAGE: \: %5.1lf (avg)\n
>
>
More information about the Xymon
mailing list