Getting Data In

Need help ingesting /var/log/mail.log.1

rene_splunk
Explorer

I have a number of log-rotated files for mail.log in the /var/log folder on a unix system. The /var/log/mail.log file gets ingested just fine, so I know permissions aren't an issue. However, I'd like to also ingest the older data that was log-rotated, but for the purpose of ingesting, those files were untarred again, so I have mail.log.1 to mail.log.4

I have tried numerous stanzas and regexes in the whitelist, but none lead to the older data getting ingested. 

The one I currently have in place is:


[monitor:///var/log/]
index = postfix
sourcetype = postfix_syslog
whitelist = (mail\.log$|mail\.log\.\d+)

Thanks for any suggestions in advance.

 

Labels (3)
0 Karma

rene_splunk
Explorer

Thanks Giuseppe,

I don't see any historical data in my index as yet, this is what's in the splunkd.log file

splunk_inputs.png

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @rene_splunk,

please try this:

[monitor:///var/log/mail.log*]
index = postfix
sourcetype = postfix_syslog

Ciao.

Giuseppe

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 ...