Splunk Search

How can I whitelist based on this 3 conditions- where condition with 3 arguments?

danutmatei
Explorer

Hi, I have an inputlookup with wSender, wSubject and wRecipient. I want to whitelist some of the emails sent by an user to a specific recipient that have a specific subject.

How can I whitelist based on this 3 conditions (Sender=X, Subject=Y, Recipient=Z) ?

I've tried: where Sender!=wSender AND Subject!=wSubject AND Recipient!=wRecipient but in this case all the email sent by wSender are whitelisted.

Also tried index=xxx AND NOT | inputlookup whitelist.csv fields wSender, wSubject, wRecipient - but the same result, the user from wSender is getting whitelisted for all the emails he sent not just the ones from wSubject.

Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

By "whitelist", it looks like you are trying to filter OUT anything that matches all 3 fields in any row in your lookup - right? Try something like this

index=xxx AND NOT [| inputlookup whitelist.csv | fields wSender, wSubject, wRecipient | format]

 

View solution in original post

danutmatei
Explorer

working like a charm, thank you

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

By "whitelist", it looks like you are trying to filter OUT anything that matches all 3 fields in any row in your lookup - right? Try something like this

index=xxx AND NOT [| inputlookup whitelist.csv | fields wSender, wSubject, wRecipient | format]

 

Get Updates on the Splunk Community!

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Shape the Future of Splunk: Join the Product Research Lab!

Join the Splunk Product Research Lab and connect with us in the Slack channel #product-research-lab to get ...