How to use spike kill?

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
User avatar
knebb
Cacti User
Posts: 138
Joined: Tue Sep 19, 2006 11:29 am

How to use spike kill?

Post by knebb »

Hi,

I have seen several topics regarding the spike kill and most of them end in "was configured somehow wrong, do not use if you do not know what you are doing".

So I am trying to unterstand this feature.
I have the following graph with two wrong data entries causing a graph spike:
cacti_graph_200.png
cacti_graph_200.png (21.73 KiB) Viewed 1011 times
Whatever "Spike Kill" option I choose in the WEb-GUI, it does simply: nothing.
DRy run tells me:

Code: Select all

NOTE: NO Standard Deviation found in '/usr/share/cacti/rra/digitemp_digi_out_temp_478.rrd'
So my question is about what I can configure or change so this feature will kill such spikes.

Any hints here?

/KNEBB
User avatar
TheWitness
Developer
Posts: 17062
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: How to use spike kill?

Post by TheWitness »

Much of this is knowing how standard deviations and variances work. You should do some research.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
knebb
Cacti User
Posts: 138
Joined: Tue Sep 19, 2006 11:29 am

Re: How to use spike kill?

Post by knebb »

Well,

I am aware how they work. But it does not at all explain why the spikes do not get killed here. If you like we can do some calculations:

Taking just this graph into account (24hrs) and without knowing the exact numbers we can assume most of the values are around 2 to 5 degree. With one value every five minutes I am at approximately 1,437 items (subtracted the two spikes and the one missing value as seen in the graph). To simplify let us assume these items only would show 5 or 2 degree in an (more or less) equal distribution. BTW: variance is much higher with this simplifying assumption compared to the real values.

So we cann assume an average expectation value of ~3.5 degrees calculated by: ( 5⋅718 + 2⋅719 + 0⋅1 + 28.69⋅2 ) / 1440 ~ 3.53
Then let's calculate the variance based on this formula: ∑i(xi−μX)2⋅P(X=xi) which results in an variance of ~3.13. The standard devation the is the square root of the variance so we are at ~1.77 degrees.

Well, that's absolutely expected so far. Every value in the range of 3.53 - 1.77 = 1.76 and 3.53 + 1.77 = 5.3 would be considered as "correct". Values below 1.76 or above 5.3 should be considered as "unusual" (or: as spike).

So back from theory:
Obviously the two values with ~ 28.69 degrees are "unusual" and should be killed. But the are not.
Which values takes the algorithm into account? Which values should I change here to get theses spikes killed?

What is the meaning of "3 (-200) Standard Deviations)", "Variance Percentage (100%-500000%)" and "Variance Outliers (3-1000 High/Low Samples)"?

Any answer except "42"?

Thanks!

/KNEBB
User avatar
TheWitness
Developer
Posts: 17062
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: How to use spike kill?

Post by TheWitness »

What does the dry run show in the reports?
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
knebb
Cacti User
Posts: 138
Joined: Tue Sep 19, 2006 11:29 am

Re: How to use spike kill?

Post by knebb »

HI,

unfortunately the graph has moved since my post so the values are merged anyways. But the spikes can still be ssen:
cacti_graph_201.png
cacti_graph_201.png (26.06 KiB) Viewed 959 times
See the attached screenshots:
StdDev:
DryRunStdDev
DryRunStdDev
cact1.png (33.03 KiB) Viewed 959 times
And variance:
DryRunVariance
DryRunVariance
cacti2.png (33.59 KiB) Viewed 959 times

The spike (much lower as before!) is still there....
User avatar
knebb
Cacti User
Posts: 138
Joined: Tue Sep 19, 2006 11:29 am

Re: How to use spike kill?

Post by knebb »

Hi,

anyone with some further explanations here? I do not get the numbers shown in the dry run screen. Where are they coming from?

Thanks!

/KNEBB
User avatar
zuka1337
Posts: 21
Joined: Thu Jan 28, 2021 9:08 am

Re: How to use spike kill?

Post by zuka1337 »

Well, I've always had problems with spikekill..

I did my own version with python you can find it here https://github.com/zuka1337/Spikepyrrd

3 things:
  • Read the code understand what's there, then use it.
  • Before you tested make an backup of the original
  • Pay attention to number 1 and 2.
Github https://github.com/zuka1337
Killspikealt https://github.com/zuka1337/killspikealt "Graphical Interface to Remove Spikes"
Spikepyrrd https://github.com/zuka1337/Spikepyrrd "Python Script to remove spikes from graph"
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests