aboutsummaryrefslogtreecommitdiff
path: root/contrib/prometheus-pacman-exporter.service
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--contrib/prometheus-pacman-exporter.service9
1 files changed, 8 insertions, 1 deletions
diff --git a/contrib/prometheus-pacman-exporter.service b/contrib/prometheus-pacman-exporter.service
index 3b3dfa6..b463cbf 100644
--- a/contrib/prometheus-pacman-exporter.service
+++ b/contrib/prometheus-pacman-exporter.service
@@ -3,15 +3,22 @@ Description=Pacman Prometheus metrics exporter
After=network-online.target
Wants=network-online.target
+# Allow the initial attempt plus five retries.
+StartLimitIntervalSec=2h
+StartLimitBurst=6
+
[Service]
Type=oneshot
EnvironmentFile=/etc/conf.d/prometheus-pacman-exporter
ExecStart=/usr/bin/prometheus-pacman-exporter $PROMETHEUS_PACMAN_EXPORTER_ARGS
+Restart=on-failure
+RestartSec=10min
+
User=root
Group=root
-# Needs write access to emit the .prom file and read/write the borg cache.
+# Needs write access to emit the .prom file.
# All other paths read-only by default
ReadWritePaths=/var/lib/prometheus/node-exporter
# Mount a private /tmp not shared with the rest of the system