
outlier
Description
This command is used to remove outlying numerical values, not to detect outlying values. The command removes or truncates outliers in the specified fields. If no fields are specified, the outlier
command processes all fields.
Syntax
outlier <outlier-options> [<field-list>]
Optional arguments
- <outlier-options>
- Syntax: <action> | <mark> | <param> | <uselower>
- Description: Outlier options. See "Descriptions for the outlier-options".
- <field-list>
- Syntax: <field> ...
- Description: Comma or space-delimited list of field names.
Outlier-options
- <action>
- Syntax: action= remove | transform
- Description: Specify what to do with the events with outlying numerical value. The
remove
option removes the event. Thetransform
option truncates the outlying value to the threshold for outliers and, ifmark=true
, prefixes the value with "000". - Abbreviations:
rm
for remove,tf
for transform. - Default: transform or tf
- Syntax: mark=<bool>
- Description: If
action=transform
, andmark=true
, then prefix values pulled into the non-outlying range with "000". Ifaction=remove
, themark
option has no effect. - Default: false
- <param>
- Syntax: param=<num>
- Description: Parameter controlling the threshold of outlier detection. An outlier is defined as a numerical value that is outside of the
param
threshold, multiplied by the inter-quartile range (IQR). - Default: 2.5
- <uselower>
- Syntax: uselower=<bool>
- Description: Controls whether to look for outliers for values below the median in addition to above the median.
- Default: false
Usage
Filtering is based on the inter-quartile range (IQR), which is computed from the difference between the 25th percentile and 75th percentile values of the numeric fields. If a field value in an event is less than (25th percentile) - param*IQR
or greater than (75th percentile) + param*IQR
, that field is transformed or that event is removed based on the action
parameter.
Examples
1: Remove all outlying numerical values
... | outlier
2: For a timechart of web server events, transform the outlying average CPU values
Create a timechart of web server events of the average CPU seconds by host. Transform the outlying values of the host averages.
404 host="webserver" | timechart avg(cpu_seconds) by host | outlier action=tf
See also
anomalies, anomalousvalue, cluster, kmeans
Answers
Have questions? Visit Splunk Answers and see what questions and answers the Splunk community has using the outlier command.
PREVIOUS nomv |
NEXT outputcsv |
This documentation applies to the following versions of Splunk® Enterprise: 6.0, 6.0.1, 6.0.2, 6.0.3, 6.0.4, 6.0.5, 6.0.6, 6.0.7, 6.0.8, 6.0.9, 6.0.10, 6.0.11, 6.0.12, 6.0.13, 6.0.14, 6.0.15, 6.1, 6.1.1, 6.1.2, 6.1.3, 6.1.4, 6.1.5, 6.1.6, 6.1.7, 6.1.8, 6.1.9, 6.1.10, 6.1.11, 6.1.12, 6.1.13, 6.1.14, 6.2.0, 6.2.1, 6.2.2, 6.2.3, 6.2.4, 6.2.5, 6.2.6, 6.2.7, 6.2.8, 6.2.9, 6.2.10, 6.2.11, 6.2.12, 6.2.13, 6.2.14, 6.2.15
Comments
Kbern, you're correct. the default is action=tf. I've corrected the docs. Thank you!
The documentation for "outlier" (above) says that "action", "Defaults to rm". That is not what I'm seeing in Splunk 4.2.3... I'm seeing it default to TF
mark=true works with tabular results, but seems to have no effect when I chart the results.
Is there a way to mark outliers in charts?