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!

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...