Alerting

How to alert if a certain transaction endswith value does not happen within a duration 60 seconds?

msehic
Explorer

Need to alert if: transaction between: “is now DOWN" OR "is now UP" is larger than 60 sec. And if the last transaction "is now DOWN" happens, but “is now UP” does not in 60 sec.
So far I built the first part: “is now DOWN" OR "is now UP" is larger than 60 sec.

Source= ("is now UP" OR "is now DOWN") | transaction startswith="is now DOWN" Endswith="is now UP" | where duration > 60 | 

However, not sure what to add if the last transaction "is now DOWN" happens, but “is now UP” does not happen within 60 sec.

0 Karma

somesoni2
Revered Legend

Try this

 Source=* ("is now UP" OR "is now DOWN") | transaction keepevicted=t startswith="is now DOWN" Endswith="is now UP" | where duration > 60 OR closed_txn=0  
0 Karma

sundareshr
Legend

Try this

Source= ("is now UP" OR "is now DOWN")  | rex (?<status>UP|DOWN)" | timechart span=61s earliest(status) as start latest(status) as end | where start="DOWN" AND end="DOWN"
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Introducing Splunk 10.0: Smarter, Faster, and More Powerful Than Ever

Now On Demand Whether you're managing complex deployments or looking to future-proof your data ...