Files
Cactidocumentation/Spikekill.md
T
Thomas Vincent 741ad51355 docs: [1.2.x] refresh the front page, correct grammar and Markdown, and align plugin pages with their READMEs (#273)
* docs: [1.2.x] refresh the manual front page

The front page opened with version notes before saying what Cacti is,
used headings as sentences in the credits, and its table of contents
listed seven sections while the page has ten.

Open with a short description and a getting-started sequence, link the
website and forums, give the credits real headings, and list every
section in the table of contents in page order. Record Jeff Pasnak
under In Memoriam with a link to the 1.2.31 release announcement.
Correct label typos and wrap long entries with reference links.

Existing section anchors are unchanged, and every page is still linked.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* docs: [1.2.x] fix typos, unrendered headings and forum links

A check of every page linked from the front page found misspellings in
eleven pages, three Mactrack headings written without a space after the
hashes, which render as plain text, and two forum links still using
http.

Correct the spellings, add the missing space so the headings render,
and point the forum links at https, where they already redirect.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* docs: [1.2.x] align the plugin pages with the plugin READMEs

The supported plugins list and the Syslog and Mactrack pages had drifted
from the README and INFO files in the plugin repositories.

Update the descriptions that the READMEs contradict: Monitor's Thold
requirement, the Router Configs transfer methods, the ReportIt release
and Cacti versions, the WMI collection methods and its development
status, and NUT support in Apcupsd. Add the Syslog requirements, the
upgrade procedure, the dedicated database settings and the remote
collector settings, and correct the database grant and a misplaced
code fence. Add the Mactrack requirements and a short section on
history partitioning and ignored ports that links to the README.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* docs: [1.2.x] correct grammar, spelling and broken Markdown

A read of every page linked from the front page found grammar and
spelling errors throughout, and Markdown that does not render as
intended.

Correct grammar, spelling, punctuation and product-name capitalization
in 95 pages without changing headings, code blocks, link targets or
the meaning of the text. Repair the Markdown defects: a code fence in
the SSH tunnel how-to that never closed, malformed bold markers in the
user management and device defaults pages, a release notes table with
no blank line before it, split rows in the tree sorting table, and
LDAP list items missing their markers. Correct three interface labels
quoted with typos.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* docs: [1.2.x] correct statements that differ from the 1.2.x source

Reviewers of the linked pages flagged statements that looked wrong.
Each was compared with the Cacti 1.2.x source at 1523aa04b, and only
those the source or the page itself settles are changed.

Correct interface labels and option names (Index Count Changed,
Permissive, Not Selected, Utilities, the BCC description, the gear
icon for plugin install), the default Maximum Value of U for a new
data source item, the sysDescr object name, the PHP floor wording in
the requirements table, the Mactrack wildcard character and the
snmptrapd -On option. Repair cross-references, example values that
disagree with their commands, two table captions, a split list and
several sentences with missing words.

Statements the source does not settle are left as written.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

---------

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
2026-11-24 00:58:06 -08:00

167 lines
6.2 KiB
Markdown

# Spikekill
## Warning
Spikekill is designed to overwrite specific data points in one or more RRD
files. You should use great caution when running Spikekill, and you should
always ensure you have proper backups from which to restore your RRDfiles if
Spikekill performs a modification that you did not expect.
## Overview
Spikekill is a tool used to remove spikes in a graph. Spikes can appear in a
graph after a device reboots, or when you switch from 32-bit to 64-bit interface
counters on a device. Spikekill works by statistically analyzing the data
contained inside an RRDfile, and overwriting specific data points. It offers
4 methods by which to analyze the data and selectively overwrite data points:
1. _Standard Deviation_
Calculates the [standard
deviation](https://en.wikipedia.org/wiki/Standard_deviation) of the data, and
overwrites data points that are _N_ times higher than the standard deviation.
2. _Variance Average_
Calculates the average value of the data, and overwrites data points that are
_N_ percent higher than the average.
3. _GapFill_
Finds gaps in the data (missing data points) and also finds data points that
are _N_ percent higher than the average, and overwrites them, but only does
so inside the specified time range.
4. _Float_
Overwrites all data points that are within a specified time range.
## How to use
### GUI
Spikekill is easily run on a graph with a couple of mouse clicks in the Cacti
GUI:
1. On Cacti's main `Graph` tab, click the Spikekill icon
![Spikekill-icon](images/spikekill.gif) next to a graph.
2. In the drop-down menu that appears, review your current settings by hovering
on `Settings` and reviewing each item, making changes if desired.
3. Run Spikekill by choosing one of the four methods available in the drop-down
menu. Spikekill runs immediately, and the graph may be modified, depending on
your settings. The graph is refreshed when Spikekill is finished.
### CLI
Spikekill also has a flexible command line interface. The following example
will help you get started.
```console
shell>php cli/removespikes.php --help
```
## Settings
Spikekill requires certain values to successfully calculate which data points to
overwrite. The following settings are customizable:
1. _Replacement Method_
When Spikekill identifies data points to overwrite, the
value of _Replacement Method_ represents the data that will be written in
place of each data point.
When _Replacement Method_ is set to `NaN`, running Spikekill using `GapFill`
or `Float` methods will perform no modifications. Please be aware of [Issue
#3673](https://github.com/Cacti/cacti/issues/3673), where 'Last Known Good'
is always used, regardless of setting.
2. _Number of Standard Deviations_
When using the Standard Deviation method, the value of _Number of Standard
Deviations_
is the coefficient which determines how many times above the standard
deviation the data must be to be considered a spike.
3. _Variance Percentage_
When using the Variance Average method, the value of _Variance Percentage_ is
the coefficient which determines how much higher than the average the data
must be to be considered a spike.
4. _Variance Number of Outliers_
When using the Variance Average method, the highest _N_ values and the lowest
_N_ values are considered _outliers_. These outliers are ignored when
calculating the average of the data.
5. _Max Kills Per RRA_
Spikekill will limit the number of data points that it
overwrites to the value of _Max Kills Per RRA_. For reference, a single
RRDfile can contain multiple _data sources_ and multiple _archives_.
Spikekill counts the kills of all data sources in an archive together, and
starts the count again for each archive. Therefore, the total number of data points
that could be overwritten in a single RRDfile will be determined by the
formula:
```console
(number_of_RRAs) x (Max_Kills_Per_RRA)
```
This only applies when using the `Standard Deviation` or `Variance Average`
methods, and does not apply when using the `GapFill` or `Float` methods.
The above settings are maintained individually for each Cacti user. The
default values can be changed globally in the Cacti settings, found at
Configuration > Settings > Spikes. A user can change her or his individual
settings by selecting different choices in the Spikekill menu which appears
next to a graph.
## Detailed Operation
### Independence between each RRA:DS pair
When Spikekill runs, it analyzes each data source (DS) of each round-robin
archive (RRA) independently. During analysis, it calculates values for
`average` and `standard deviation` for each RRA:DS pair.
To understand this better, consider the following example.
- You have a round-robin database (RRD) file that stores traffic levels on a
router interface.
- You have two DSes, which are `traffic_in` and `traffic_out`.
- You also have selected three profiles, which are 1 minute for 7 days, 15
minutes for 5 weeks, and 1 hour for 3 years.
- Lastly, you have three consolidation functions (CF), which are `average`,
`min`, and `max`.
In this example, you have 9 RRAs (3 profiles multiplied by 3 CFs). Therefore,
Spikekill will calculate 18 averages and 18 standard deviation values (9 RRAs
multiplied by 2 DSes). Data points for each RRA:DS pair will be compared
against their respective `average` and `standard deviation` values.
### Search order
Spikekill searches for spikes in the same order as `rrddump` exports data,
which is sequentially by RRA, from oldest to newest data points within each
RRA. Data points are overwritten if they exceed the maximum allowed threshold
or if they do not reach the minimum required threshold.
Spikekill will cease overwriting data points for any individual RRA when it has
reached the value of _Max Kills Per RRA_, counting all DSes of that RRA
together. It will then begin the process again on the next RRA.
This means that for any given RRA, older spikes will always be overwritten
before newer spikes. However, newer spikes in one RRA can still be overwritten
before older spikes in a different RRA, since the thresholds are different per
RRA:DS pair.
---
Copyright (c) 2004-2026 The Cacti Group