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!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

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 ...