Control restart via systemd

This commit is contained in:
phil 2023-11-20 11:55:43 +01:00
parent 387ddb8106
commit 1eb01f7c00
4 changed files with 29 additions and 19 deletions

View file

@ -1,8 +0,0 @@
# {{ ansible_managed }}
check process grafana with pidfile /var/run/grafana/grafana-server.pid
group monitor
start program = "/bin/systemctl start grafana-server.service"
stop program = "/bin/systemctl stop grafana-server.service"
if failed host localhost port 3000 with timeout 15 seconds for 3 times within 4 cycles then restart
if 5 restarts with 5 cycles then timeout

View file

@ -0,0 +1,8 @@
# Ansible managed
[Unit]
StartLimitIntervalSec=6
StartLimitBurst=10
[Service]
Restart=always