Drop one sample from the Munin data

I use munin to monitor the postgresql database, and I made a one-time change due to which munin got a bad result (queries per second by several orders of magnitude from the normal range) that wraps my graphs. Is there a way that I can easily remove one data point from munin data?

I think I need some kind of rrd editor, but I'm not sure what will be easier. It is annoying that the data is not just stored in clear text :(

+6
linux graph monitoring
source share
2 answers

Assuming you are using Linux, it looks something like this:

$ # 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 
+12
source share

take a backup of your rrd,

stop everything that writes, or be quick

export to xml: rrdtool dump thefile.rrd> thefile.xml edit in vi, replacing the figure with NaN violation

import rrdtool restore thefile.xml (or any other syntax - google it)

to do

+1
source share

All Articles