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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
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, ...