Splunk Search

How to use detect numeric outlier to detect cpu utilization outlier

waihoong
New Member

My objective is to collect cpu utilization and then use detect numeric outlier to find out the odds one. However the values in the outlier is not the real percentage of my cpu utilization but more of counts of events. What command should i use in order to plot outlier graph with my real cpu percentage?

command i'm using:
Part 1
sourcetype=csv source=cpu "Node Name"=host*

earliest=-14d | bin _time span=5m
| stats count by _time
| eventstats avg("count") as avg max("count") as Maximum
| eval count=if(count=Maximum, avg, count)
| eventstats avg("count") as avg stdev("count") as stdev
| eval lowerBound=(avg-stdev*exact(4)), upperBound=(avg+stdev*exact(4))
| fields lowerBound, upperBound
| dedup lowerBound, upperBound
| fields - _time
| outputlookup utilization.csv

Part 2:
| bin _time span=5m
| stats count by _time
| eval lowerBound=0
| eval upperBound=[|inputlookup utilization.csv | return $upperBound]
| eval isOutlier=if( count > upperBound, 1, 0)
| fields _time, count, lowerBound, upperBound, isOutlier, *

Part 1 is to collect the utilization percentage and calculate the upper boundary
part 2 is to use the boundary calculated in part 1 and used it to detect outlier

However, the boundary should be less than 100 as this is a utilization percentage, the value I calculated is 500+ which makes me believe it is the count of event and not the value itself.

Tags (2)
0 Karma
Get Updates on the Splunk Community!

Earn a $35 Gift Card for Answering our Splunk Admins & App Developer Survey

Survey for Splunk Admins and App Developers is open now! | Earn a $35 gift card!      Hello there,  Splunk ...

Continuing Innovation & New Integrations Unlock Full Stack Observability For Your ...

You’ve probably heard the latest about AppDynamics joining the Splunk Observability portfolio, deepening our ...

Monitoring Amazon Elastic Kubernetes Service (EKS)

As we’ve seen, integrating Kubernetes environments with Splunk Observability Cloud is a quick and easy way to ...