Getting Data In

inputs.conf Blacklist Query

kevinmorley
New Member

Hi - I'm struggling with the syntax of this blacklist expression and would much appreciate some guidance from anybody that can help. What I'd like to do is blacklist all events other than EventCode=4740 which match the pattern Message=AccountName: *$".

I've been trying variations on the following expression without much success:
blacklist1 = EventCode="(?!4740)" Message="Account Name:[\s+](.\$)"

The 'Message' expression works fine - it's the 'EventCode' negative lookahead clause that I'm struggling with:

Thanks in advance for any suggestions you can provide.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Please clarify. Do you want to see only event 4740 with AccountName=* or event 4740 with AccountName!="*$"?
Have you considered a whitelist?

---
If this reply helps you, Karma would be appreciated.
0 Karma

kevinmorley
New Member

I want to exclude all events except for 4740 which match the pattern Message="Account Name: *$".
By way of example
Include: EventCode="4740" Message="Account Name: computer1$"
Exclude: EventCode="4652" Message="Account Name: computer1$"

I think that a whitelist would have a similar issue as it would require a negative lookahead in the 'Message' clause - but please do feel free to correct me if I'm mistaken.

0 Karma
Get Updates on the Splunk Community!

Earn a $35 Gift Card for Answering our Splunk Admins & App Developer Survey

Survey for Splunk Admins and App Developers is open now! | Earn a $35 gift card!      Hello there,  Splunk ...

Continuing Innovation & New Integrations Unlock Full Stack Observability For Your ...

You’ve probably heard the latest about AppDynamics joining the Splunk Observability portfolio, deepening our ...

Monitoring Amazon Elastic Kubernetes Service (EKS)

As we’ve seen, integrating Kubernetes environments with Splunk Observability Cloud is a quick and easy way to ...