Getting Data In

Issue with Blacklist in Inputs.conf

vaibhavagg2006
Communicator

Hi Experts
I have following monitor stanza . I want to blacklist "data/xyz/logs/router.jar.log" but want to monitor "/data/xyz/logs/abc/abc-router/abc-router.jar.log" . Though I have mentioned router.* still is blacklisting "abc-router.jar.log". Please help here

[monitor:///data/xyz/logs/]
index = test
sourcetype = test_st
whitelist=\.jar\.log$
blacklist=discovery.*|router.*|java.*
disabled = 0

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi vaibhavagg2006,
maybe you alredy tested this solution:

[monitor:///data/xyz/logs/]
index = test
sourcetype = test_st
whitelist=\.jar\.log$
blacklist=(discovery|router|java)\/abc-router\.jar\.log
disabled = 0

Bye.
Giuseppe

0 Karma

vaibhavagg2006
Communicator

Thanks for your inputs
I do not want to blacklist /logs/abc/abc-router.jar.log
Only want to blacklist /logs/router.jar.log

0 Karma

gcusello
SplunkTrust
SplunkTrust

try

 [monitor:///data/xyz/]
 index = test
 sourcetype = test_st
 whitelist=logs\/\.jar\.log$
 blacklist=(discovery|router|java)\/abc-router\.jar\.log
 disabled = 0

Bye.
Giuseppe

0 Karma

inventsekar
SplunkTrust
SplunkTrust

may i know, if the monitor path was correct in the question?!?!

[monitor:///data/xyz/logs/abc/abc-router/]
index = test
sourcetype = test_st
whitelist=.jar.log$
blacklist=discovery\.|router\.|java\.*
disabled = 0

0 Karma

vaibhavagg2006
Communicator

Monitor path is "///data/xyz/logs/"

There are multiple dynamic folders under logs
abc
qwe
poi

Also there is a file "router.jar.log" inside logs folder. I want to black list it. But want to index a file "abc-router.jar.log" present in /logs/abc/

0 Karma

inventsekar
SplunkTrust
SplunkTrust
  1. maybe, try whitelist alone(without blacklist) and blacklist alone, then together..
  2. whitelist=\.jar\.log$
  3. blacklist=discovery\.|router\.|java\.*
0 Karma
Get Updates on the Splunk Community!

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...