Splunk Search

How can I filter my search if I don't want to return results containing certain field-value pairs?

sympatiko
Communicator

Hi splunkers,

Good day! How can I write a search if I don't want all HOST and PROCESS fields.

Say for example, I don't want:
host=10.10.10.10, process=apache2, mysql, etc..

Thanks

Tags (2)
0 Karma
1 Solution

sduff_splunk
Splunk Employee
Splunk Employee
NOT host=10.10.10.10 NOT process=apache2 NOT process=mysql

View solution in original post

0 Karma

sduff_splunk
Splunk Employee
Splunk Employee
NOT host=10.10.10.10 NOT process=apache2 NOT process=mysql
0 Karma

woodcock
Esteemed Legend

Please also be aware that NOT process=apache2 is NOT the same as process!=apache2. The former keeps events where isnull(process) is TRUE, whereas the latter does not (drops events where isnull(process) is TRUE. This may matter to you.

sympatiko
Communicator

You're a God!

0 Karma

MuS
Legend

Just to add something; NOT search should be avoided, especially in regards of search performance and scalability. See the docs about this http://docs.splunk.com/Documentation/Splunk/6.2.4/Search/Writebettersearches#Tips_for_tuning_your_se...

sympatiko
Communicator

Thanks for the tips. But no worries I just used it in order to extract a specific details from a data that I uploaded

0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...