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

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

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

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...