Splunk Search

Exclude a result in search

djras123
Observer

I am trying to exclude this from a search. They are almost all the same just the sshd instance changes can someone help me exclude?

ras1-dan-cisco-swi error: PAM: Authentication failure for illegal user djras123 from 192.168.1.2 - dcos_sshd[17284]
ras1-dan-cisco-swi error: PAM: Authentication failure for illegal user djras123 from 192.168.1.2 - dcos_sshd[29461]
ras1-dan-cisco-swi error: PAM: Authentication failure for illegal user djras123 from 192.168.1.2 - dcos_sshd[4064]
ras1-dan-cisco-swi error: PAM: Authentication failure for illegal user djras123 from 192.168.1.2 - dcos_sshd[9450]

Thanks guys besides excluding each one,

Labels (1)
0 Karma

PickleRick
SplunkTrust
SplunkTrust

While you could do an explicit exclusion as @marnall already showed it's probably not the most effective solution. Remember that by default inclusion is better than exclusion.

So the question is whether the events you want to exclude differ significantly from those you include? (Of course the best thing would be if you could differentiate them by an indexed field).

0 Karma

marnall
Motivator

While not the most computationally efficient, you could use a negating keyword search for the string you would like to exclude:

<yourSPL> NOT "PAM: Authentication failure for illegal user djras123 from"

Or have it on a separate search line, if your SPL does not end on a "search" command:

<yourSPL>
| search NOT "PAM: Authentication failure for illegal user djras123 from"
0 Karma
Get Updates on the Splunk Community!

SOC Modernization: How Automation and Splunk SOAR are Shaping the Next-Gen Security ...

Security automation is no longer a luxury but a necessity. Join us to learn how Splunk ES and SOAR empower ...

Ask It, Fix It: Faster Investigations with AI Assistant in Observability Cloud

  Join us in this Tech Talk and learn about the recently launched AI Assistant in Observability Cloud. With ...

Index This | How many sides does a circle have?

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