FS#61176 - [filebeat] default configuration not running - wrong user/group settings
Attached to Project:
Community Packages
Opened by Thomas Jäger (xunil64) - Wednesday, 26 December 2018, 12:17 GMT
Last edited by Massimiliano Torromeo (mtorromeo) - Monday, 03 June 2019, 08:37 GMT
Opened by Thomas Jäger (xunil64) - Wednesday, 26 December 2018, 12:17 GMT
Last edited by Massimiliano Torromeo (mtorromeo) - Monday, 03 June 2019, 08:37 GMT
|
Details
Description:
Filebeat is not running with the default configuration. * open /var/lib/filebeat/registry: permission denied * failed to rotate backups: failed to rotate backups: rename /var/log/filebeat/filebeat.4 /var/log/filebeat/filebeat.5: permission denied * ... /usr/lib/systemd/system/filebeat.service is running with user filebeat, but the default configs/path are created with root:root - /var/log/filebeat - /var/lib/filebeat - /usr/share/filebeat Additional info: * version: filebeat-6.5.4-1 (but was wrong with prior versions too) Steps to reproduce: * pacman -S filebeat * <edit> /etc/filebeat/filebeat.yml * systemctl start filebeat.service |
This task depends upon
Closed by Massimiliano Torromeo (mtorromeo)
Monday, 03 June 2019, 08:37 GMT
Reason for closing: Fixed
Additional comments about closing: filebeat-7.1.1-1
Monday, 03 June 2019, 08:37 GMT
Reason for closing: Fixed
Additional comments about closing: filebeat-7.1.1-1
chown -R filebeat:filebeat /var/lib/filebeat/
chown -R filebeat:filebeat /var/log/filebeat
But then, you also need to make sure that the filebeat user can read your logs. E.g. this could help for nginx logs:
usermod -aG log filebeat
If you need to use a different user you can drop a file in /etc/systemd/system/filebeat.service.d/user.conf with:
[Service]
User=myuser