[xymon] Possible to sum rrd into one graph ?

Stef Coene stef.coene at docum.org
Fri Aug 27 13:50:17 CEST 2010


On Friday 27 August 2010, SEGLARD, Thomas wrote:
> But, my mistake, this is only part of answer and I don't exactly write what
> I wanted to know. What I want is a way to sum the RRDs from different
> servers and corresponding to the graph definition « ifstat ». The main
> problem is that the RRDs are not in the same place/directory and thus I
> have no way to tell rrdtool where to get these RRDs. This is the main
> problem and why I required some help J
> 
> I could do some scrtipt which sync on a regular basis these RRDs into one
> server directory. It's not very elegant (but I think this will work !). In
> a future release, maybe it will be possible to use the Metrics reports to
> do all the maths we want with different RRDs ? ;)
Easy, make a subdirectory like graph1 and in that subdirectory add symlinks to 
the different rrd files.  You can give the symlink an other name like
graph/vmstat-server1.rrd -> server1/vmstat.rrd

In the graph definition, you can match all vmstat-* files and voila, you can 
make the sum of what you want:

[vmstat-avm-total]
   FNPATTERN vmstat-(.+).rrd
   TITLE Accessed Virtual Memory
   YAXIS Size kB
   -b 1024
   DEF:avm at RRDIDX@=@RRDFN@:mem_avm:AVERAGE
   CDEF:sw at RRDIDX@=avm at RRDIDX@,4048,*
   LINE1:sw at RRDIDX@#@COLOR@:@RRDPARAM@:STACK
   GPRINT:sw at RRDIDX@:LAST:AVM  \: %5.1lf%s (cur)
   GPRINT:sw at RRDIDX@:MAX: \: %5.1lf%s (max)
   GPRINT:sw at RRDIDX@:MIN: \: %5.1lf%s (min)
   GPRINT:sw at RRDIDX@:AVERAGE: \: %5.1lf%s (avg)\n

I do this for adding CPU load on a pSeries with lpars so I can make the sum of 
all physical CPU usage.


Stef



More information about the Xymon mailing list