33 lines
922 B
SYSTEMD
33 lines
922 B
SYSTEMD
|
|
[Unit]
|
||
|
|
Description=promtail is the agent responsible for gathering logs and sending them to Loki.
|
||
|
|
Documentation=https://github.com/grafana/loki/blob/master/docs/promtail.md
|
||
|
|
After=network-online.target
|
||
|
|
Wants=network-online.target
|
||
|
|
|
||
|
|
[Service]
|
||
|
|
# added automatically, for details please see
|
||
|
|
# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
|
||
|
|
ProtectSystem=full
|
||
|
|
ProtectHome=true
|
||
|
|
PrivateDevices=true
|
||
|
|
ProtectHostname=true
|
||
|
|
ProtectClock=true
|
||
|
|
ProtectKernelTunables=true
|
||
|
|
ProtectKernelModules=true
|
||
|
|
ProtectControlGroups=true
|
||
|
|
RestrictRealtime=true
|
||
|
|
# end of automatic additions
|
||
|
|
User=root
|
||
|
|
Environment=CONFIG_FILE=/etc/promtail/%i.yaml
|
||
|
|
ExecStart=/usr/bin/promtail -config.file=${CONFIG_FILE}
|
||
|
|
ExecReload=/bin/kill -HUP $MAINPID
|
||
|
|
# Give a reasonable amount of time for promtail to start up/shut down
|
||
|
|
TimeoutSec = 60
|
||
|
|
TimeoutStopSec=20s
|
||
|
|
SendSIGKILL=no
|
||
|
|
Restart=always
|
||
|
|
RestartSec = 2
|
||
|
|
|
||
|
|
[Install]
|
||
|
|
WantedBy=promtail.target
|