Alerting

compare two results of the same search for different ranges and generate alert

soutyanson
New Member

dears,
this is my basic search:

index=index1 source=source1 sessionID

I will like compare the results (count) of the basic search for some timestamps and generate an alert mail if .

for exemple:

index=index1 source=source1 sessionID earliest = -10m latest = now --> Result1
index=index1 source=source1 sessionID earliest = -5m latest = now --> Result2
If Result2< 0,75*Result1 --> generate mail containing Result1

thanks

Tags (3)
0 Karma

somesoni2
Revered Legend

Try something like this

index=index1 source=source1 sessionID earliest = -10m latest = now | eval Result2=if(_time>relative_time(now(),"-5m"),1,0) | eventstats count as Result1 sum(Result2) as Result2 | where Result2< 0.75*Result1
0 Karma
Get Updates on the Splunk Community!

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...

Adoption of Infrastructure Monitoring at Splunk

  Splunk's Growth Engineering team showcases one of their first Splunk product adoption-Splunk Infrastructure ...

Modern way of developing distributed application using OTel

Recently, I had the opportunity to work on a complex microservice using Spring boot and Quarkus to develop a ...