28 lines
636 B
Django/Jinja
28 lines
636 B
Django/Jinja
[Unit]
|
|
Description=Grafana Alloy
|
|
Documentation=https://grafana.com/docs/alloy/latest/
|
|
Wants=network-online.target
|
|
After=network-online.target
|
|
|
|
[Service]
|
|
User=alloy
|
|
Group=alloy
|
|
Type=simple
|
|
|
|
# Commande de démarrage finale et correcte, basée sur la sortie de "alloy run --help"
|
|
ExecStart=/usr/bin/alloy run /etc/alloy/config.alloy \
|
|
--storage.path=/var/lib/alloy \
|
|
--server.http.listen-addr=127.0.0.1:12345
|
|
|
|
# Sécurité via systemd
|
|
ReadWritePaths=/var/lib/alloy
|
|
ReadOnlyPaths=/etc/alloy
|
|
|
|
# Politiques de redémarrage et de limites de fichiers
|
|
Restart=on-failure
|
|
RestartSec=5s
|
|
LimitNOFILE=65536
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|