Splunk Search

kvstore with custom key fields

hoytn
Explorer

Can I define a custom key field in a kvstore?

I've created the kvstore with following configuration:
_key, targetUser, action, time
(the action will be add or remove)

If the following entry exists: bob, add, 1552602818
And I will add to kvstore the entry "bob, remove, 1552603818", action and time fields should be updated, rather than creating new entry
If targetUser is different (not existing in the kvstore) entry should be added.

Is this possible? I will need to populate the kvstore as events arrive using a scheduled search.

Thank you.

1 Solution

starcher
SplunkTrust
SplunkTrust

You can set _key to whatever value you want. Such as the username value. Use eval _key=... before your outputlookup append=true

View solution in original post

starcher
SplunkTrust
SplunkTrust

You can set _key to whatever value you want. Such as the username value. Use eval _key=... before your outputlookup append=true

Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...