Control restart via systemd
This commit is contained in:
parent
387ddb8106
commit
1eb01f7c00
4 changed files with 29 additions and 19 deletions
|
@ -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
|
8
files/systemd/override.conf
Normal file
8
files/systemd/override.conf
Normal file
|
@ -0,0 +1,8 @@
|
|||
# Ansible managed
|
||||
|
||||
[Unit]
|
||||
StartLimitIntervalSec=6
|
||||
StartLimitBurst=10
|
||||
|
||||
[Service]
|
||||
Restart=always
|
Loading…
Add table
Add a link
Reference in a new issue