Getting Data In

Inputs.conf and special characters

rmorlen
Splunk Employee
Splunk Employee

I have an inputs.conf file that had a monitor statement like:

[monitor:///*_ECM/A/doc/abc.log]

Files are NOT being picked up. If I get rid of the * and put a file name like:

[monitor:///DOC_ECM/A/doc/abc.log]

it works fine.

How do I escape out the "_" or use a Regex to get the correct filenames?

Tags (1)
0 Karma

lguinn2
Legend

This seems like a bug, based on what you have described here. I would file a support ticket.

But I think there may also be a work-around.

First, for the stanza, do either of these work?

[monitor:///*ECM/A/doc/abc.log]

[monitor:///*/A/doc/abc.log]

If you can make it work for a wider selection of directories (I know that isn't optimal), then you can restrict using the whitelist:

[monitor:///*ECM/A/doc/abc.log]
whitelist=^/.*?_ECM/

This whitelist should work for either of the stanzas above. Whitelists are regular expressions, stanzas are not.

lguinn2
Legend

Thanks - let us know how it works out!

0 Karma

rmorlen
Splunk Employee
Splunk Employee

Submitted a ticket to support.

Tried your suggestions above and it did NOT work.

Even looking in the logs I see where Splunk is reading the values from inputs.conf but no files get picked up and show up in WatchedFile.

0 Karma

rmorlen
Splunk Employee
Splunk Employee

Linux, not Windows.

0 Karma

lukejadamec
Super Champion

Is this windows? If so, you cannot use wildcards at the root.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Take Action Automatically on Splunk Alerts with Red Hat Ansible Automation Platform

 Are you ready to revolutionize your IT operations? As digital transformation accelerates, the demand for ...

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...

Beyond Detection: How Splunk and Cisco Integrated Security Platforms Transform ...

Financial services organizations face an impossible equation: maintain 99.9% uptime for mission-critical ...