Splunk Search

How to use inputlookup OUTPUT properly when a column is blank?

anirban_nag
Explorer

This is a follow up question with respect to this previous question - https://answers.splunk.com/answers/627286/how-to-filter-multiple-regex-condition-and-create.html

The answer for that is working for me. But it doesn't work when there is a blank value in a column for which lookup is set for.
Like even if Email contains splunk but Message is blank then it is OUTPUT as OTHER, where it is expected as Splunk in Type.

0 Karma

somesoni2
Revered Legend

You should be doing lookup based on the column which is primary key (something that can uniquely identify your event data and lookup data. If it can be just user name (which shouldn't be blank), they do the lookup just based on that column.

0 Karma

harsmarvania57
Ultra Champion

Hi @anirban_nag,

Based on previous answer, can you please try below query

your base search that gives you the first table above
| fillnull value=NULL Address UserName Email Message 
| lookup get_type Address, UserName, Email, Message OUTPUT Type
| fillnull value="Other" Type
0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

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