Getting Data In

Need help writing input stanza for maillog

Jarohnimo
Builder

I'm having a hard time getting my stanza setup correctly. I basically want to monitor the maillog directories (maillog + maillog-date) and choose the best appropriate sourcetype

However the archive maillog directories aren't coming in

Can someone spin me In the right direction on how to better write this stanza? Please resist the urge to send me a splunk doc link as I've been rummaging through those for a while.. it's not clicking

 

Can someone please help me in rewriting a better stanza

[monitor:///var/log]
Whitelist =(maillog$)
disabled = false
sourcetype = maillog
Index = linux

Currently it's not working where it's pulling in the archive logs. So anything with a date after maillog isn't getting pulled

I think I tried [monitor:///var/log/maillog*] without the whitelist but it isn't working

Labels (1)
0 Karma

brent_weaver
Builder

Hey there. Check Splunk's _internal index for any nuggets of info on this issue. This is assuming that the internal logs are being forwarded. If not look at the splunkd.log file on the host that has the input configured.

Splunk btool command may be of use to ensure that this config is even being read or being over ridden somehow. If you are editing the inputs.conf manually make sure that splunkd can read the inputs.conf file.

Just some things that come to mind...

0 Karma

isoutamo
SplunkTrust
SplunkTrust
Have you check permission of files and directories, so your splunk user can read those or are you running splunk as root (security risk)?
r. Ismo
0 Karma

Jarohnimo
Builder

Hi, I do have read permission as other logs are coming in

 

Could you please tell me if: maillog 

 

Is the correct sourcetype for /var/log/maillog

 

I saw a few choices but it's unclear what's the best to use. Sendmail_syslog I thought looked promising but there I am guessing again 

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Monitoring AI Agents with Splunk Observability Cloud

Let’s say I’m running a travel planning AI app in production. A user asks for three concise hotel options in ...

[Puzzles] Solve, Learn, Repeat: Tiling

This puzzle (first published here) is based on finding groups of tessellated tiles (inspired by floor tiles I ...

SOK it to Me: Top 3 Benefits of Using Splunk Operator on Kubernetes that’ll Make ...

    Thursday, July 9, 2026  |  11:00AM–12:00PM PDT Duration: 1 hour (includes Q&A) Managing can feel like a ...