Splunk Search

inputlookup csv two files get the data

surekhasplunk
Communicator

Hi,

I have two input lookup files. input1.csv and input2.csv

Am getting "Maintenance for application" as value for say one of the columns from input1.csv file.
Now I want to search word application in input2.csv file and try to get field1 and field2 from input2.csv file along with field3 and field4 from input1.csv file.
Please help me with the query.

Tags (3)
0 Karma

anjambha
Communicator

You can try this .. if you are working on the same use case..

https://answers.splunk.com/answers/589532/lookup-two-csv-pattern-match-query.html

| inputlookup input1 | join type=outer field1 [| inputlookup input2 | eval field1=case(field3 == "application file", "application support", field3 == "cto maintenance", "technology maintenance") | search field3="application*" | rename field2 as field21 ] | table field1, field2, field21, field3

if possible avoid same field name in your two input csv files. or you can rename that at the query time..

0 Karma

somesoni2
Revered Legend

Assuming input1.csv has following columns (apart from other possible columns)

app_description (which contains the text "Maintenance for **application**"
field3 
field4

What's the column name in input2.csv which contains word application? Also, is it a full match OR partial match?

0 Karma

surekhasplunk
Communicator

Hi @somesoni2

Assume input2.csv file has a column named app_name which has got a match for application and not the exact name.

0 Karma
Get Updates on the Splunk Community!

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

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

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...