All Apps and Add-ons

Monitoring for Splunk: How can I search for a string then evaluate matches by additional criteria?

Deepz2612
Explorer

Hi,

Please help me with the below :

I wanted to write a search query where
1.the query should find the keyword "SA.service.com"
2.if found should search the keyword "Connection reset error (of different event)
3. If found should check the time difference between the events and if the time diff is less and equal to 1 min it should output the event

0 Karma

cmerriman
Super Champion

perhaps something like:

|eval keyword1=if(like(_raw,"%SA.service.com%"),1,0)
|eval keyword2=if(like(_raw,"%Connection reset error%"),1,0)
|sort 0 - _time
|streamstats values(_time) as next_time values(keyword2) as keyword_2 values(_raw) as _raw window=1 current=f reset_after="("keyword1==1")"
|where isnotnull(keyword_2)
0 Karma
Get Updates on the Splunk Community!

Splunk Observability Synthetic Monitoring - Resolved Incident on Detector Alerts

We’ve discovered a bug that affected the auto-clear of Synthetic Detectors in the Splunk Synthetic Monitoring ...

Video | Tom’s Smartness Journey Continues

Remember Splunk Community member Tom Kopchak? If you caught the first episode of our Smartness interview ...

3-2-1 Go! How Fast Can You Debug Microservices with Observability Cloud?

3-2-1 Go! How Fast Can You Debug Microservices with Observability Cloud? Learn how unique features like ...