Getting Data In

How to blacklist a single source path on a universal forwarder?

prakash007
Builder

I have the monitor stanza on one of my Universal Forwarders.....I tried to blacklist a particular JVM from which the logs are not required to be monitored. Any help would be appreciated on this.

inputs.conf

    [monitor:///opt/server/webservers/*/logs/access*.log]
    sourcetype=access_logs
    blacklist=\/opt\/server\/webservers\/JVM_DEV\/logs\/access*\.log
    crcSalt = <SOURCE>
    index=devint2
0 Karma
1 Solution

prakash007
Builder

some how this worked for me as my logs might be in 2 different formats

/opt/server/webservers/JVM_DEV/logs/access.20160203000000.log
/opt/server/webservers/JVM_DEV/logs/access20160203000000.log

blacklist=\/opt\/server\/webservers\/JVM_DEV\/logs\/access\.?\d+\.log

View solution in original post

0 Karma

prakash007
Builder

some how this worked for me as my logs might be in 2 different formats

/opt/server/webservers/JVM_DEV/logs/access.20160203000000.log
/opt/server/webservers/JVM_DEV/logs/access20160203000000.log

blacklist=\/opt\/server\/webservers\/JVM_DEV\/logs\/access\.?\d+\.log
0 Karma

ddrillic
Ultra Champion

.? takes care of the optional dot...

0 Karma

woodcock
Esteemed Legend

Like this:

    blacklist=\/opt\/server\/webservers\/JVM_DEV\/logs\/access[^\.]*\.log
0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...