Splunk Enterprise

Why is Splunk not ingesting .txt logfiles starting with a numeric value?

dbrooks_CIR
New Member

I am trying to bring in some .txt logfiles using Splunk forwarder. There are several logs in the directory, such as Log.txt, 10Log.txt, 20Log.txt, etc. These files are changed daily, and the 10, 20, etclog.txt files are written to daily. So far, I can only get Splunk to ingest the Log.txt file and nothing else. My inputs.conf file is currently as below. I have tried to monitor just *.txt with the same results. Only Log.txt is read/ingested.

[monitor://E:\Logs\CIR_Remote\*Log.txt]
disabled = false
sourcetype = LOG4NET
index = log4net
initCrcLength=1024

any input would be appreciated!

Labels (1)
0 Karma

PickleRick
SplunkTrust
SplunkTrust

I don't know why (didn't bother to investigate it) but I noticed that sometimes specifying wildcard path to files doesn't work whereas specifying whole directory with a whitelist matching only set of files does.

Unfortunately, you can't specify two different sets of files from the same directory since each input stanza must be unique.

Anyway, check your config with

splunk btool inputs list --debug

and verify list of monitored files with

splunk list monitor
0 Karma

somesoni2
Revered Legend

Check if first few lines/characters of all those files (Log.txt and <N>Log.txt) have some common header/characters. If they've some common header/characters, Splunk will think that they're rolled log files. To resolve it, you'll need to adjust initCrcLength value to be slighly more that the length of those common header/characters.

0 Karma

dbrooks_CIR
New Member

No, the files are not the same. They start with a datetime stamp, and then include error information. They have never been ingested at all, always skipped for some reason.

0 Karma
Get Updates on the Splunk Community!

Observability Unlocked: Kubernetes Monitoring with Splunk Observability Cloud

 Ready to master Kubernetes and cloud monitoring like the pros? Join Splunk’s Growth Engineering team for an ...

Update Your SOAR Apps for Python 3.13: What Community Developers Need to Know

To Community SOAR App Developers - we're reaching out with an important update regarding Python 3.9's ...

October Community Champions: A Shoutout to Our Contributors!

As October comes to a close, we want to take a moment to celebrate the people who make the Splunk Community ...