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!

Splunk Decoded: Business Transactions vs Business IQ

It’s the morning of Black Friday, and your e-commerce site is handling 10x normal traffic. Orders are flowing, ...

Fastest way to demo Observability

I’ve been having a lot of fun learning about Kubernetes and Observability. I set myself an interesting ...

September Community Champions: A Shoutout to Our Contributors!

As we close the books on another fantastic month, we want to take a moment to celebrate the people who are the ...