Splunk Search

Is it possible to fetch events from bar index in 5 seconds after event in foo index?

RiberaJoice
Splunk Employee
Splunk Employee

I have a query to fetch account create endpoint and errors after

 

(index=foo "account/create") OR (index=bar ERROR)

 

But right part of OR would return all errors in time frame.

Is it possible to fetch events from bar index in 5 seconds after event in foo index?

I found Localize function, but looks like it works only in same index

Labels (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

You can do that with the map command. 

(index=foo "account/create") 
| eval earliest=_time, latest=_time + 5
| map search="index=bar ERROR earliest=$earliest$ latest=$latest$"

 

---
If this reply helps you, an upvote would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Improve Your Security Posture

Watch NowImprove Your Security PostureCustomers are at the center of everything we do at Splunk and security ...

Maximize the Value from Microsoft Defender with Splunk

 Watch NowJoin Splunk and Sens Consulting for this Security Edition Tech TalkWho should attend:  Security ...

This Week's Community Digest - Splunk Community Happenings [6.27.22]

Get the latest news and updates from the Splunk Community here! News From Splunk Answers ✍️ Splunk Answers is ...