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!

Splunk Forwarders and Forced Time Based Load Balancing

Splunk customers use universal forwarders to collect and send data to Splunk. A universal forwarder can send ...

NEW! Log Views in Splunk Observability Dashboards Gives Context From a Single Page

Today, Splunk Observability releases log views, a new feature for users to add their logs data from Splunk Log ...

Last Chance to Submit Your Paper For BSides Splunk - Deadline is August 12th!

Hello everyone! Don't wait to submit - The deadline is August 12th! We have truly missed the community so ...