Splunk Search

Create key value pair from a key and value column

Cuyose
Builder

I am not sure why I can't figure this out, been all over and each untable or makemv solution fails for this simple challenge.

I have a lookup with 3 fields
id, key, value

this will produce rows that look like the following with these headers
ID, KEY, VALUE
1, installDate, 10/15/2010
1,closeDate, 07/21,2003
1,deployed,yes
2,date1, .... etc.

I want to be able to do select ids where deployed=yes InstallDate=*

I can't for the life of me figure this out

0 Karma

somesoni2
Revered Legend

Give this a try

| inputlookup yourlookup.csv | fields ID KEY VALUE
| eval {KEY}=VALUE | field - KEY VALUE
| stats values(*) as * by ID
| where deployed="yes" AND installDate="<whatever>"
0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...