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!

Fueling your curiosity with new Splunk ILT and eLearning courses

At Splunk Education, we’re driven by curiosity—both ours and yours! That’s why we’re committed to delivering ...

Splunk AI Assistant for SPL 1.1.0 | Now Personalized to Your Environment for Greater ...

Splunk AI Assistant for SPL has transformed how users interact with Splunk, making it easier than ever to ...

Unleash Unified Security and Observability with Splunk Cloud Platform

     Now Available on Microsoft AzureOn Demand Now Step boldly into the AI revolution with enhanced security ...