Splunk Search

get rows in lookup that does not have entry in search result

dchoubey
Engager

I have a Lookup "Consumer_Lookup.csv" (30 rows approx)

Consumer     Restricted

A                         Y

B                         Y

C                         N

Search - Index = "xyz" |stats count(Status) AS Total by ClientId|Table ClientId TOtal

ClientId         Total

A                       500

C                       200

my requirement is to find any Consumer in Lookup with Restricted = "Y" not in the search result. Can you please advise on how to proceed. Should I use Join or any other alternative .

 

Thanks for your help!!

 

Labels (2)
0 Karma
1 Solution

abowesman
Explorer

@dchoubey 

 

base_search
| append [
  | inputlookup Consumer_Lookup.csv
  | rename Consumer as ClientId
]
| stats values(*) as * by ClientId
| where isnull(Total)

 

will do the trick

 

View solution in original post

dchoubey
Engager

Thank you @abowesman it worked perfectly

 

 

0 Karma

abowesman
Explorer

@dchoubey 

 

base_search
| append [
  | inputlookup Consumer_Lookup.csv
  | rename Consumer as ClientId
]
| stats values(*) as * by ClientId
| where isnull(Total)

 

will do the trick

 

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