Splunk Search

CSV Lookup - Exclusions - Help Required.

driva
Path Finder

Hi guys,

I'm trying to work out what's wrong with my search (see below). I have a CSV lookup file with a list of names that I would like to exclude from the search results.

index=new RequestID=* NOT [| inputlookup User_Exclusions.csv | fields Exclude_User ] | stats count | rename count as Total

Any help is greatly appreciated!

Many thanks!

D

0 Karma
1 Solution

driva
Path Finder

Hi guys, I got it working - I was using format in the subsearch however the hiccup I made was that the 'field' Exclude_Users within the CSV did not quite match the Field within Splunk. I made the field of users I wanted to exclude match the field name within the CSV file and it all started working. Thanks for your help, much appreciated!

View solution in original post

driva
Path Finder

Hi guys, I got it working - I was using format in the subsearch however the hiccup I made was that the 'field' Exclude_Users within the CSV did not quite match the Field within Splunk. I made the field of users I wanted to exclude match the field name within the CSV file and it all started working. Thanks for your help, much appreciated!

rmmiller
Contributor

You are missing the format command.

Take a look at this:
https://answers.splunk.com/answers/724348/excluding-a-list-of-ips-from-the-results.html

driva
Path Finder

Hi rmmiller, thanks for getting back to me. Unfortunately it does not work with '| format' added. It appears that the inputlookup works when run as an independent search but not as a subsearch.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Did you put | format in the subsearch or main search. It should be in the subsearch and it should have worked.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

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

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...