Security

Splunk cannot read messages logs

hartfoml
Motivator

I have my indexer and search-head installed on RHES and splunkd is not running as root. I can see that the /var/log/messages and other logs are not accessible by the user that is running splunkd. I would like to collect system logs from my indexers and search-head without giving the splunkd Damon root access.

Any suggestions?

0 Karma
1 Solution

grijhwani
Motivator

Adding splunk to the syslog group will most likely give it access to your principal system logs, but not everything. Another option is to make the logs world-readable. A third option is to create a new group altogether, ensure that all your logs are written under and readable by that group, and add the splunk user to this group instead.

Finally, to help you with all your syslog configuration needs you could install syslog-ng, which is a highly flexible replacement for the stock syslogd service, which allows vastly greater control over the output files created by syslog.

View solution in original post

grijhwani
Motivator

Adding splunk to the syslog group will most likely give it access to your principal system logs, but not everything. Another option is to make the logs world-readable. A third option is to create a new group altogether, ensure that all your logs are written under and readable by that group, and add the splunk user to this group instead.

Finally, to help you with all your syslog configuration needs you could install syslog-ng, which is a highly flexible replacement for the stock syslogd service, which allows vastly greater control over the output files created by syslog.

hartfoml
Motivator

Grijhwani,

Only three questions and yet 29 answers. you are my hero!!!

0 Karma

hartfoml
Motivator

Thanks much

0 Karma

Ayn
Legend

Disagree with previous comment - generally permissions are set so that non-administrative users cannot read most stuff in /var/log.

0 Karma

linu1988
Champion

i don't think splunk needs root access to read logs. If you are using monitor stanza it should read it..

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...