I recently had a situation where I installed a munin-node on a server, and the first readings it put out were garbled. I mean, that were 10^250 or some such ridiculous value. This was messing up the graphs for the day…and then the week and so on. It also messed up the averages.

I figured there must be an out-lier that was causing this to happen, but I was stuck with the issue of how to remove this single value (or string of values). Munin stores it’s values in an RRD stored in /var/lib/munin on Debian. What I had to do was to export each database for the graph I was concerned about – the memory graph has several elements, each one a separate database – into XML. Then edit the XML (just replacing the out-lier with NaN does the trick). Then reimport the XML, forcing overwriting of the existing data to make sure I replace the old value.

cd /var/lib/munin
rrdtool dump server-memory-swap-d.rrd > /home/user/server-memory-swap-d.xml
rrdtool restore /home/user/server-memory-swap-d.xml server-memory-swap-d.rrd -f

Written on July 17th, 2008 , Informative

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

SirSpanky.com – The Secret Diary of James Pearce Aged 20-Something is proudly powered by WordPress and the Theme Adventure by Eric Schwarz
Entries (RSS) and Comments (RSS).

SirSpanky.com – The Secret Diary of James Pearce Aged 20-Something

Personal jorunal of a professional geek – James Pearce in Perth, Australia