har*_*ryh 6 linux monitoring graph
我正在使用munin监视postgresql数据库,我做了一次更改,导致munin得到一个糟糕的声音(每秒查询超出正常范围的许多数量级),这搞砸了我的图形.有什么方法可以轻松地从munin数据中删除单个数据点吗?
我想我需要某种rrd编辑器,但我不确定什么是最简单的.恼人的是,数据不只是以明文存储:(
dan*_*ton 12
假设您正在运行Linux,它会是这样的:
$ # 1) Stop the cron job from running
$ sudo mv /etc/cron.d/munin /tmp/munin-cron-job
$ # 2) Run as munin account
$ sudo su - munin
$ # 3) Wait a minute, else run this to make sure any
$ # background munin-cron is finished
$ munin-cron
$ # 4) Export data file to XML
$ rrdtool dump \
> /var/lib/munin/example.com/www.example.com-$PLUGIN-d.rrd \
> > /tmp/data.xml
$ # 5) Run your favorite editor on the XML file
$ # (The data will likely have been transformed.
$ # Making a backup first wouldn't hurt.)
$ vi /tmp/data.xml
$ # 6) Import the changes
$ rrdtool restore \
> /tmp/data.xml \
> /var/lib/munin/example.com/www.example.com-$PLUGIN-d.rrd
$ rm /tmp/data.xml
$ # You might want to delete related graphic files /var/cache/munin/...
$ # 7) Exit munin account and re-enable cron job
$ exit
$ sudo mv /tmp/munin-cron-job /etc/cron.d/munin
Run Code Online (Sandbox Code Playgroud)
小智 1
备份你的rrd,
停止写入任何内容,或者快点
导出到 xml:rrdtool dump thefile.rrd > thefile.xml 在 vi 中编辑,用 NaN 替换有问题的数字
导入rrdtool恢复thefile.xml(或任何语法 - 谷歌它)
完毕