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!

Take Action Automatically on Splunk Alerts with Red Hat Ansible Automation Platform

 Are you ready to revolutionize your IT operations? As digital transformation accelerates, the demand for ...

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...

Beyond Detection: How Splunk and Cisco Integrated Security Platforms Transform ...

Financial services organizations face an impossible equation: maintain 99.9% uptime for mission-critical ...