Thursday, January 20, 2011

How to combine RRD files to an overview graph? (rrdtool, collectd)

I have collect runnings which puts performancedate like cpu usage oder network bandwith into rrd files.

My problem is, that i have a single file for each node in the cluster.

How can I get an overview graph for my Cluster?
(for example I have 5 nodes which send each 10Mbit, so the graph schould show 50Mbit)

  • You just specify each file for the DEF: section of rrdtool. See below for a hacky one-off I did as an example. Notice that one of them is foo_kbrandt_foo1 and the other is foo_kbrandt_foo2. So the graph is pulling from two different rrd files.

    rrdtool graph MessagesDeliveredPerMinInfomationStores.png \
    --imgformat=PNG \
    --title="Messages Delivered Per Minute" \
    --base=1000 \
    --height=600 \
    --width=1000 \
    --start='February 13 2009' \
    --slope-mode \
    --lower-limit=0 \
    --vertical-label="Messages Delivered Per Minute" \
    --step 10000 \
    'DEF:a=/usr/local/nagios/var/rra/foo/foo_kbrandt_foo1_delivered.rrd:msg_per_min:AVERAGE' \
    'LINE2:a#FF0000:arf Messages Per Minute\l'  \
    'GPRINT:a:AVERAGE:arf Delivered Average\: %7.2lf %s\j'  \
    'GPRINT:a:MAX:arf Delivered MAX\: %7.2lf %s\j'  \
    'DEF:b=/usr/local/nagios/var/rra/foo/foo_kbrandt_foo2_delivered.rrd:msg_per_min:AVERAGE' \
    'LINE2:b#33FF33:blip Messages Per Minute\l'  \
    'GPRINT:b:AVERAGE:blip Delivered Average\: %7.2lf %s\j'  \
    'GPRINT:b:MAX:blip Delivered MAX\: %7.2lf %s\j'  \
    

0 comments:

Post a Comment