Splunk Search

How to exclude data from a field?

MR1992
Explorer

Is there a way to exclude specified data from a single field. The example I have is on Destination IP addresses from a firewall. 

Splunk is currently showing multiple IP addresses in the field that is the direct path from source to destination and some are related to our specific appliances that we do not need to see. e.g. I have 3 IP's as below

1.1.1.1

1.1.1.2

1.1.1.3

I know what 1.1.1.1 and 1.1.1.2 are so I need to exclude them from view on the field but I want to keep 1.1.1.3. I need my know IP's excluded as there are many others that I am not aware of. I have around 50 IP's I want excluded from the field.  

Labels (2)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

From your description, I assume ip is a multivalue field (?)

| eval ip=mvfilter(ip!="1.1.1.1" AND ip!="1.1.1.2")

View solution in original post

0 Karma

MR1992
Explorer

Yeah it working great, thank you

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

From your description, I assume ip is a multivalue field (?)

| eval ip=mvfilter(ip!="1.1.1.1" AND ip!="1.1.1.2")
0 Karma

MR1992
Explorer

Yes that is correct we have it coming into splunk as list(dest) would this exclude or only show the stated IPs? I would want it to exclude 1.1.1.1 & 1.1.1.2 from the field just to leave 1.1.1.3 on the output

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

It keeps what passes the test i.e. everything that is not equal to 1.1.1.1 and not equal to 1.1.1.2

0 Karma
Get Updates on the Splunk Community!

Splunk Mobile: Your Brand-New Home Screen

Meet Your New Mobile Hub  Hello Splunk Community!  Staying connected to your data—no matter where you are—is ...

Introducing Value Insights (Beta): Understand the Business Impact your organization ...

Real progress on your strategic priorities starts with knowing the business outcomes your teams are delivering ...

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...