Splunk Search

inputlookup excluding index

jmo1
Path Finder

 I am trying to write a query that will ignore events in certain indexes (these indexes change over time).  I have a CSV file with a single column that looks like this...

Index

a

b

c

   NOTE: this is a simple example, it really has 25+ indexes

 

 

 

host=* NOT index=[| inputlookup Index.csv | fields Index]

 

 

  This is my non-working attempt.  The actual query is irrelevant (host=*), the point is that I want to ignore any hits where the index is in the CSV file (index!=a index!=b index!=c).

 

Any help would be greatly appreciated.

 

Labels (1)
0 Karma
1 Solution

bowesmana
SplunkTrust
SplunkTrust

You don't need the index=... and case is important, so use this

host=* NOT [ | inputlookup indexes.csv | rename Index as index ]

Note the rename, as your column is Index, not index, so either change the column name in the table and just use | table index or go with the above

 

View solution in original post

0 Karma

bowesmana
SplunkTrust
SplunkTrust

You don't need the index=... and case is important, so use this

host=* NOT [ | inputlookup indexes.csv | rename Index as index ]

Note the rename, as your column is Index, not index, so either change the column name in the table and just use | table index or go with the above

 

0 Karma

jmo1
Path Finder

Thank you!  It is working.

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!

Design, Compete, Win: Submit Your Best Splunk Dashboards for a .conf26 Pass

Hello Splunkers,  We’re excited to kick off a Splunk Dashboard contest! We know that dashboards are a primary ...

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...

Network to App: Observability Unlocked [May & June Series]

In today’s digital landscape, your environment is no longer confined to the data center. It spans complex ...