Skip to content

Instantly share code, notes, and snippets.

@slomo
Created February 9, 2012 22:38
Show Gist options
  • Save slomo/1783911 to your computer and use it in GitHub Desktop.
Save slomo/1783911 to your computer and use it in GitHub Desktop.
#!/bin/bash
MUNIN_DIR="/var/lib/munin"
TARGET="${HOME}/test"
DIRS=$( find /var/lib/munin -iname *.rrd -exec dirname {} \; | uniq )
for DIR in ${DIRS}; do
mkdir -p ${TARGET}${DIR}
done
FILES=$( find /var/lib/munin -iname *.rrd )
for FILE in ${FILES}; do
rrdtool dump ${FILE} > ${TARGET}${FILE}.xml
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment