Splunk Search

high cpu over xtime alert

mcbradfordwcb
Engager

I want to create an alert when the cpu is at 50% or higher for greater than 5 mins.

I thought this would work, but it is not:

host=myhost sourcetype="PerfmonMk:Process" instance=java "%_Processor_Time">50
| bucket _time span=5m
| stats avg("%_Processor_Time") as CPU by _time
| where CPU>50

Thoughts?

Tags (1)
0 Karma

maciep
Champion

I don't think you need the proccessor time filter in your base search. Let your stats worry about the calculation.

for similar requests, we've typically used min(). If the minimum over a period is greater than your threshold, then it was above your threshold the whole time. The avg() could be above the threshold even if it's dipping/spiking over that period.

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...