HOWTO remove spikes from RRD graphs

If you happen to use rrdtool to create graphs to monitor equipment you might have come upon some “spikes” in your graphs. These are perfectly normal and happend due to machines that have rebooted and have reset their counters or other anomalies that might occur.

There is a script called removespikes.pl made specially to fix these cases. You can either find the tool here: http://oss.oetiker.ch/rrdtool/pub/contrib/removespikes.tar.gz or get it from my blog removespikes.pl.gz

Extract it, and then type something in the command line like the following:
for i in /location/of/rrds/*; do /full/path/to/removespikes.pl $i; done;

You should probably see some messages like these:

Chopping peak at <!– 2005-10-25 17:00:00 EEST / 1130248800 –>
Chopping peak at <!– 2005-10-25 19:00:00 EEST / 1130256000 –>

That’s all…enjoy your graphs.

10 Responses to “HOWTO remove spikes from RRD graphs”

  1. tirexx
    March 24th, 2006 | 21:10
    Using Internet Explorer Internet Explorer 6.0 on Windows Windows XP

    exelent!

  2. Harry
    September 4th, 2007 | 12:27
    Using Mozilla Firefox Mozilla Firefox 2.0.0.6 on Windows Windows XP

    Brilliant!

  3. serenity
    September 6th, 2007 | 21:30
    Using Mozilla Firefox Mozilla Firefox 2.0.0.5 on Mac OS Mac OS

    Wonderful!

  4. November 4th, 2007 | 05:03
    Using Mozilla Firefox Mozilla Firefox 2.0.0.9 on Windows Windows XP

    My graps are nice again:-) Thanks!

  5. Rui
    June 26th, 2009 | 17:02
    Using Mozilla Firefox Mozilla Firefox 3.0.11 on Windows Windows XP

    Perfect and simple! Nice job!

  6. October 6th, 2009 | 11:50
    Using Safari Safari 531.9 on Mac OS X Mac OS X 10.6.1

    You made my day !!! Thanks !

  7. martin
    June 25th, 2011 | 19:47
    Using Mozilla Firefox Mozilla Firefox 5.0 on Windows Windows 7

    perfect work !!!

  8. Ed
    December 19th, 2011 | 21:01
    Using Google Chrome Google Chrome 16.0.912.63 on Windows Windows 7

    cannot execute binary file 🙁 why is this not pure perl? is there something to hide?

  9. December 20th, 2011 | 10:02
    Using Google Chrome Google Chrome 16.0.912.63 on Linux Linux

    @Ed: you didn’t try and execute the .gz file directly, did you ? You need to uncompress it first.

  10. st0n3
    April 3rd, 2012 | 15:17
    Using Google Chrome Google Chrome 17.0.963.83 on Windows Windows 7

    I had to gunzip the file twice…
    give it a try…in my case it worked

Leave a reply