Splunk Search

Is it possible to the output _key from a kvstore (i.e. with "lookup", not "inputlookup")?

torleifg
New Member

Is it possible to output the _key field from a kvstore when using lookup (not inputlookup)?

I.e. something like this:

... some search| lookup mykvstore some_field OUTPUT _key

(which does not seem to work)

I am aware of the need to rename _key to be able to display it when using inputlookup, but I need to use "lookup".

The use case is to keep track of how many times each row in the kvstore is looked up as part of a larger search.

0 Karma
1 Solution

harsmarvania57
Ultra Champion

Hi @torleifg,

Try below query

<yourSearch>| lookup mykvstore kvstore_field AS raw_data_field OUTPUT _key AS key

View solution in original post

harsmarvania57
Ultra Champion

Hi @torleifg,

Try below query

<yourSearch>| lookup mykvstore kvstore_field AS raw_data_field OUTPUT _key AS key

torleifg
New Member

Thanks, this worked perfectly, I was convinced I had already tried this, but somehow I must have missed it.

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

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