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.