Getting Data In

Why is a specific file type still being indexed with my inputs.conf whitelist configuration?

mlaufenb
New Member

Here's my stanza:

[monitor:///opt/stash/logs/]
blacklist = \.gz$
disabled = false
followTail = 0
index = stash_pp
sourcetype = log4j
whitelist = (*access\.log$|*stash\.log$|*mail\.log$|*profiler\.log$|*debug\.log$|*plugin\.log$|*codesearch\.log$|\.out$)

I'm getting this file type atlassian-stash-access-2015-08-31.0.log which should have been excluded with the whitelist specification. Is there something wrong with the syntax?

Any help would be appreciated!

0 Karma

lguinn2
Legend

The proper regular expression for the whitelist is

whitelist = (.*access\.log$|.*stash\.log$|.*mail\.log$|.*profiler\.log$|.*debug\.log$|.*plugin\.log$|.*codesearch\.log$|\.out$)

The * alone just means "match an asterisk" in regular expressions. While Splunk does sometime allow a mix of globbing and regular expressions, don't do it here...

0 Karma
Get Updates on the Splunk Community!

Accelerating Observability as Code with the Splunk AI Assistant

We’ve seen in previous posts what Observability as Code (OaC) is and how it’s now essential for managing ...

Integrating Splunk Search API and Quarto to Create Reproducible Investigation ...

 Splunk is More Than Just the Web Console For Digital Forensics and Incident Response (DFIR) practitioners, ...

Congratulations to the 2025-2026 SplunkTrust!

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