Splunk Search

item and time column lookup help

BP9906
Builder

I have several rows of a CSV lookup
Name,00:00,00:15,00:30
test1,A,A,A
test2,A,N,N

I want to matchup _time with the column name and give me that value for each of the rows.

_time=00:15 (ie bin span=15m _time)

results should be:

Name,result
test1,A
test2,N

How do I accomplish this since the columns have the values? I tried foreach and map, but have come up empty handed.

Thanks.

Tags (1)
0 Karma

jkat54
SplunkTrust
SplunkTrust

You can open the csv copy everything and “paste special” then use the paste option that rotates the data 90 deg. Do that before indexing data...

Or you can use the transpose command to do the same at search time. Will have to dress it up a bit but it would look something like this after transpose

Col1, col2,
TestName, Time

Try this:

| transpose
| rename col2 as _time, col1 as Name

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