Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

3 Answers 3

up vote 4 down vote accepted

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.

share|improve this answer
    
For Munin's rrds 2nd and 3rd links didn't work for me. The first one did the job. Thanks! –  Putnik Nov 15 '13 at 20:42

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/'`;
share|improve this answer

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

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.