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, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...