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?

- 1,424
- 3
- 20
- 29

- 141
- 2
- 7
-
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. – Marco Ramos Apr 27 '11 at 19:40
-
I updated removespikes to work with recent changes in rrd xml format https://gist.github.com/1132437 – valodzka Aug 08 '11 at 18:56
4 Answers
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.

- 3,120
- 23
- 25
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 :-)

- 315
- 1
- 5
- 24

- 79,879
- 17
- 130
- 214
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/
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.

- 412
- 4
- 9