Splunk Search

Updating KV Store Field Value For Several Events

joemarty82
Explorer

Hello,

 

I am having problems approaching this problem. Say we have a KV store that stores asset information from a few different sources. The kv store has about 20 uniq fields. One of the fields within that kv store is state. Basically, the state is either (new) or (update) referencing how it was placed within the kv store. I would like to add another potential value called (stale) if it was last updated over 90 days ago.

 

At the same time I now have some logic that goes through the source indexes and pulls out events that are older than 90 days. Right now that list is about 1,000. With that list I want to basically say "Any event that is older than 90 days, take that hostname and match any hostname entry within the KV store that is identical, and update the state field entry with the value of (state)". Obviously, I would like to do that with the entire list of 1,000. I am hoping someone might have some psuedo code or best practice tips as I am having problems getting started with it.

 

Thanks,

Joe

Labels (1)
0 Karma
Get Updates on the Splunk Community!

Accelerating Observability as Code with the Splunk AI Assistant

We’ve seen in previous posts what Observability as Code (OaC) is and how it’s now essential for managing ...

Integrating Splunk Search API and Quarto to Create Reproducible Investigation ...

 Splunk is More Than Just the Web Console For Digital Forensics and Incident Response (DFIR) practitioners, ...

Congratulations to the 2025-2026 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...