OS Version: I've only tested DEB installations on Ubuntu 18.04, but I'd imagine it happens on all systemd enabled Linux systems
Beat Version: 7.0.0, 7.0.1
In a unit file for any beat BEAT_LOG_OPTS is defaulted to -e
This will make logging options in the configuration file obsolete/ignored.
Examples:
Filebeat systemd unit file (snippet):
[Service]
Environment="BEAT_LOG_OPTS=-e"
filebeat.yml (snippet):
logging:
level: info
to_files: true
to_syslog: false
json: true
files:
path: '/var/log/filebeat'
name: 'filebeat'
keepfiles: '7'
permissions: '0644'
Expected result:
Logging to files in the /var/log/filebeat directory
Actual result:
Logging to /var/log/syslog
Why not keep all the configurations in the configuration file, instead of having it split up in 2 files: systemd drop in file for logging options, and a configuration file for all other options?
Blindly removing the environmental variable BEAT_LOG_OPTS results in the configuration file being used for everything, and for logging to happen in the expected result.
Is there ANY reason not to do this? It's both much simpler AND much cleaner for the user.
OS Version: I've only tested DEB installations on Ubuntu 18.04, but I'd imagine it happens on all systemd enabled Linux systems
Beat Version: 7.0.0, 7.0.1
In a unit file for any beat
BEAT_LOG_OPTSis defaulted to-eThis will make logging options in the configuration file obsolete/ignored.
Examples:
Filebeat systemd unit file (snippet):
filebeat.yml (snippet):
Expected result:
Logging to files in the
/var/log/filebeatdirectoryActual result:
Logging to
/var/log/syslogWhy not keep all the configurations in the configuration file, instead of having it split up in 2 files: systemd drop in file for logging options, and a configuration file for all other options?
Blindly removing the environmental variable
BEAT_LOG_OPTSresults in the configuration file being used for everything, and for logging to happen in the expected result.Is there ANY reason not to do this? It's both much simpler AND much cleaner for the user.