Splunk Enterprise Security

Find events from two indexes based on a time range

wtaylor149
Explorer

I have a need to reconcile Splunk ES rule changes. I am using the rest API to pull the "updated" rule changes. The issue with this is the logs in splunk don't identify the user who updates the rule. I have another index that is our change management system. This system may or may not have the exact splunk rule somewhere in the description field. The change mgmt system has a beginning and ending time range. The "updated" time should fall w/in that range.

The only way to correlate these two indexes, would be to take the "updated" timestamp and check the change mgmt logs for the "begin_chg_time > updated AND updated < end_chg_time".

Basically I believe I'm stuck on taking the field "updated" and checking for the change record in the change mgmt index.

Any help would be greatly appreciated.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

A subsearch should be able to do that.

 index=bar <your change mgmt search here> 
 [ search index=foo "updated" 
 | eval earliest=relative_time(_time,"-5min@min"), latest=relative_time(_time,"+5min@min") 
 | fields earliest latest 
 | format]
---
If this reply helps you, Karma would be appreciated.
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.


Introducing Unified TDIR with the New Enterprise Security 8.2

Read the blog
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...