簡體   English   中英

從munin數據中刪除一個樣本

[英]Drop a single sample from munin data

我正在使用munin監視postgresql數據庫,我做了一次更改,導致munin得到一個糟糕的聲音(每秒查詢超出正常范圍的許多數量級),這搞砸了我的圖形。 有什么方法可以輕松地從munin數據中刪除單個數據點嗎?

我想我需要某種rrd編輯器,但我不確定什么是最簡單的。 惱人的是,數據不只是以明文存儲:(

假設您正在運行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

備份你的rrd,

停止寫任何東西,或快速

導出到xml:rrdtool轉儲vi中的file.rrd> thefile.xml編輯,用NaN替換有問題的數字

import rrdtool restore thefile.xml(或者不管語法是什么 - 谷歌吧)

DONE

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM