3

I've got an RRDtool graph that has a huge spike after a reboot. I've tried using the popular removespikes.pl script on it, but just returns a "No peaks found.!". What's the best way to take care of this?

2
  • I've now seen that you already tried removespikes.pl, so I edited my answer. Try to use it with -t, this should solve your problem. Hope it helps. Apr 27, 2011 at 19:40
  • I updated removespikes to work with recent changes in rrd xml format gist.github.com/1132437
    – valodzka
    Aug 8, 2011 at 18:56

4 Answers 4

7

I'd recommend this perl script, which is available on the rrdtool contrib page itself. I've used it the past and it works fine. It automatically removes the spikes and it even does a backup of the .rrd file :)

Quoting the README file:

README for removespikes.pl

This version of removespikes.pl is based on Vins Vilaplana and Humberto Rossetti Baptistas code.

I have added value-based chopping (-t value), an analysis-only mode (-a), control of verbose/debug output (-d/-v), a help option (-h) and some code cleanup.

removespikes>./removespikes.pl -h REMOVESPIKES: Remove spikes from RRDtool databases.

Usage: ./removespikes.pl -d -a [-l number] [-t maxval] name_of_database

Where: -d enables debug messages
-a runs only the analysis phase of the script
-h prints this message
-l sets the % limit of spikes bin-based chopping (default: 0.6)
-t sets the value above which records are chopped. Disabled by default. Enabling value-based chopping will disable bin-based chopping.

-v Verbose mode. Shows some information name_of_database is the rrd file to be treated.

removespikes>

Enjoy

EDIT: I've now seen that you already tried removespikes.pl but you got "no peaks found". Try to use it with -t flag, this should solve your problem.

2
  • Tried -t with all sorts of values, no luck.
    – raccettura
    Apr 27, 2011 at 19:49
  • you can tweak -l as well for bin based chopping. Apr 27, 2011 at 20:06
3

My normal answer is "You can't edit RRD files." or "You have to use rrdtool to dump it, edit the dump and restore it - that's too much work!", but you seem like a nice guy so I'll point you at rrdEditor :-)

2

The version of removespikes.pl linked in the answer above does not support the -t option. However, the latest version 20140730-lux does. You can find it at the offical RRDTool website here: http://oss.oetiker.ch/rrdtool/pub/contrib/

0

I've solved it another way: compute the 95 percentile of the data, then apply this to the max height of graph. So you keep your spikes, but you end up with much useful graphs, even without spikes. But it needs some more computing before creating the graph. I can post a gist with PHP code that does it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .