




























I was getting an error with systemctl start filebeat-oss.service.
I fixed it by adjusting the systemd service file to align with the one used in the official .deb file available here: https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-8.17.0-amd64.deb
diff --git a/filebeat-oss.service b/filebeat-oss.service
index 022b869..3d6912a 100644
--- a/filebeat-oss.service
+++ b/filebeat-oss.service
@@ -5,10 +5,12 @@ Wants=network-online.target
After=network-online.target
[Service]
-Environment="BEAT_LOG_OPTS=-e"
+UMask=0027
+Environment="GODEBUG='madvdontneed=1'"
+Environment="BEAT_LOG_OPTS="
Environment="BEAT_CONFIG_OPTS=-c /etc/filebeat-oss/filebeat.yml"
-Environment="BEAT_PATH_OPTS=-path.home /usr/share/filebeat-oss -path.config /etc/filebeat-oss -path.data /var/lib/filebeat-oss -path.logs /var/log/filebeat-oss"
-ExecStart=/usr/bin/filebeat-oss $BEAT_LOG_OPTS $BEAT_CONFIG_OPTS $BEAT_PATH_OPTS
+Environment="BEAT_PATH_OPTS=--path.home /usr/share/filebeat-oss --path.config /etc/filebeat-oss --path.data /var/lib/filebeat-oss --path.logs /var/log/filebeat-oss"
+ExecStart=/usr/bin/filebeat-oss --environment systemd $BEAT_LOG_OPTS $BEAT_CONFIG_OPTS $BEAT_PATH_OPTS
Restart=on-failure
[Install]
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。
It is quite simple - there is only one '-' character missing from the path information in the file filebeat-oss.service (see also):