Splunk Search

lookup based on 2 fields not working

spyme72
Path Finder

i have created a lookup.csv file as below and uploaded the file.
then i have created lookup definition with this particular file.
then i have created a automatic lookup where the lookup input fields are hostname and technology and the lookup output fields is gold.

Gold.csv
technology hostname gold
OS stc08a00 sts08a00
OS std08a00 sts08a00
OS std08a01 sts08a00
OS sts08a00 sts08a00
SAP stc08a00 sts08a00
SAP std08a00 sts08a00
SAP std08a01 sts08a00
SAP sts08a00 sts08a00

now when i write a search to get the gold of SAP, its not returning any gold value but when i search for OS it works.
query and results:
index="abc" technology=OS | table hostname,gold
host gold
1 std08a01 sts08a00
2 stc08a00 sts08a00
3 std08a01 sts08a00
4 stc08a00 sts08a00
5 std08a00 sts08a00
6 sts08a00

7 std08a00 sts08a00
8 sts08a00

index="abc" technology=SAP| table hostname,gold

host    gold

1 std08a01

2 stc08a00

3 std08a00

4 stc08a00

5 sts08a00

6 std08a00

7 std08a01

8 sts08a00

please let me know where i am going wrong. doesnt lookup work when we use 2 fields as input?

Tags (1)
0 Karma
1 Solution

spyme72
Path Finder

it worked, the issue was in the data where i had the field name as host instead of hostname. fixing that fixed the lookup

View solution in original post

0 Karma

spyme72
Path Finder

it worked, the issue was in the data where i had the field name as host instead of hostname. fixing that fixed the lookup

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

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

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