Splunk Search

Return NOT matching events

munisb
Explorer

Hi,

I am trying to return values that DO NOT MATCH the search between an index and .csv file

Ex - this returns the values that are good but i don't want to see these:

index=myindex TAGGING="*Agent*" | dedup DNS | join type=inner DNS [ | inputlookup linuxhostnames.csv | rename hostname as DNS]

 

whereas, I tried the following - this takes slightly longer to return the results but also returns only the matching values instead of the NOT MATCHING

| inputlookup linuxhostnames.csv | rename hostname as DNS | search NOT [search index=myindex| fields DNS | format ]

 

Will appreciate some guidance here.

 

Thank you

Labels (2)
Tags (2)
0 Karma
1 Solution

munisb
Explorer

I don't get it why this works but it does:

| inputlookup linuxhostnames.csv | rename hostname as DNS | search [search index=myindex| fields DNS | format ]

Now, I only get results that DO NOT MATCH. However, the search is slow. Would there be a faster way to do this?

View solution in original post

0 Karma

munisb
Explorer

I don't get it why this works but it does:

| inputlookup linuxhostnames.csv | rename hostname as DNS | search [search index=myindex| fields DNS | format ]

Now, I only get results that DO NOT MATCH. However, the search is slow. Would there be a faster way to do this?

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...