Splunk Search

I want to ignore particular username

N92
Path Finder

I want to ignore below user name. So I written following manner is it correct?

......| where NOT (user="*$" OR user="NOT_TRANSLATED")

Now, Can I rewrite as below:

......| where NOT LIKE(user, "*$" OR "NOT_TRANSLATED")

Tags (1)
0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi N92,
at first in like you cannot use a boolean operator, you have to divide your condition and in addition if you use "like" you have to use "%" instead "*".
So

......| where NOT (LIKE(user, "%$") OR LIKE(user, "NOT_TRANSLATED") ) 

Bye.
Giuseppe

View solution in original post

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi N92,
at first in like you cannot use a boolean operator, you have to divide your condition and in addition if you use "like" you have to use "%" instead "*".
So

......| where NOT (LIKE(user, "%$") OR LIKE(user, "NOT_TRANSLATED") ) 

Bye.
Giuseppe

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 ...