Splunk Search

Need help in lookups

shiva_kolachala
Engager

Hi,

I am having trouble using lookups. I have four fields in a csv file error_code,criticality, service,service_type,Info

My events in logs have fields extracted error_code,service,service_type. Now my reqirement is if an error_code with specific service and service_type should print that particular Info.

I tried this query:
sourcetype="lookup-test" | stats count by error_code,service,service_type,buis_proc | lookup error_code error_code as error_code service as service service_type as service_type OUTPUT Info as description.

But I am unable to get the description for all the entries. Please help

error_code service service_type buis_proc count description

1 100 CARDSERVICES RED STATUS_UPDATE 1 contactRED

2 101 WALLET LEDGER BALANCE_ENQUIRY 1

3 200 CARDSERVICES VISA STATUS_UPDATE 1

4 201 CARDSERVICES RBS STATUS_UPDATE 1 contactRBS

5 202 WALLET LEDGER BALANCE_ENQUIRY 1

6 203 CARDSERVICES NUCLEUS STATUS_UPDATE 1

7 205 CARDSERVICES GANDD STATUS_UPDATE 1

8 206 WALLET LEDGER BALANCE_ENQUIRY 1

9 207 CARDSERVICES VISA STATUS_UPDATE 1

10 300 WALLET LEDGER BALANCE_ENQUIRY 1

Tags (2)
0 Karma
1 Solution

_d_
Splunk Employee
Splunk Employee

Try this a let us know what the result is? (I am assuming that you have defined the lookup in your transforms.conf and the stanza name is error_code)

sourcetype="lookup-test" | stats count by error_code,service,service_type,buis_proc | lookup error_code error_code service service_type OUTPUT Info

View solution in original post

0 Karma

_d_
Splunk Employee
Splunk Employee

Try this a let us know what the result is? (I am assuming that you have defined the lookup in your transforms.conf and the stanza name is error_code)

sourcetype="lookup-test" | stats count by error_code,service,service_type,buis_proc | lookup error_code error_code service service_type OUTPUT Info

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

What Is the Name of the USB Key Inserted by Bob Smith? (BOTS Hint, Not the Answer)

Hello Splunkers,   So you searched, “what is the name of the usb key inserted by bob smith?”  Not gonna lie… ...

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...