Skip to content

Instantly share code, notes, and snippets.

@harukasan
Last active December 18, 2015 04:39
Show Gist options
  • Save harukasan/5727450 to your computer and use it in GitHub Desktop.
Save harukasan/5727450 to your computer and use it in GitHub Desktop.
Muninのグラフを修正したかった。 ref: http://qiita.com/items/70cbb6df4b70a704eaaa
$ sudo ./modify_rrd.sh /var/lib/munin/example.com/example2-if_eth0-up-c.rrd
#!/bin/bash -x
#
# muninのデータを修正するツール
#
name=`basename ${1}`
tmp_xml="/tmp/${name}.xml";
rrdtool dump ${1} ${tmp_xml};
vim ${tmp_xml};
\mv ${1}{,.backup};
rrdtool restore ${tmp_xml} ${1};
chown munin:munin ${1};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment