2

I'm monitoring my Debian GNU/Linux server with Munin monitoring software. I was wondering whether I could export the raw data used to generate Munin charts?

I want to do some in-depth statistical analysis for example on outgoing traffic. CSV or some similar table format preferred.

I was reading in some forums that the data is stored in some RRDtool database format. It can be exported using rrdump or rrdxport but both are rather used for RRD-internal ex- and import and only dump XML files.

Did anyone try to extract the data to CSV and if so, how?

3 Answers 3

5

Did you try googling? I searched "rrd2csv" (thinking that it'd probably be named thusly, if it existed), and found:

https://code.google.com/p/rrd2csv/

Alternatively, there's https://github.com/mscoutermarsh/RRD-to-CSV

and in Python => https://gist.github.com/afternoon/947301

As it's Perl, and Open Source, you can customise it to meet your exact requirements.

1
  • For Munin's rrds 2nd and 3rd links didn't work for me. The first one did the job. Thanks!
    – Putnik
    Nov 15, 2013 at 20:42
1

If you want convert munin rdd data to SQL or CSV, you can inspire on this script

https://gist.github.com/raelga/5926594

To export to CSV:

sed -n "s@.*-- \(.* CEST\).*<v>\(.*\)</v></row>@\'$host\',\'$data\',\'\2\',\'\1\'@p" $rrd.xml >> munin.csv; 

Else ways you must adapt the regular expressions to your data

host=`echo $rrd | sed 's/\(.*\)_\(.*\)\.rrd/\1/'`;
data=`echo $rrd | sed 's/\(.*\)_\(.*\)\.rrd/\2/'`;
0

You can also check out my little Python project for this task

https://bitbucket.org/dzzh/rrdtool-csv

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .