-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnursery-alert.monit
26 lines (23 loc) · 1002 Bytes
/
nursery-alert.monit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!monit
# This should be installed in /etc/monit/conf.d/
check process nursery-alert with pidfile "/var/run/nursery-alert.pid"
start program = "/sbin/start nursery-alert"
stop program = "/sbin/stop nursery-alert"
if failed port 80 protocol HTTP
request /ping
with timeout 10 seconds
then restart
#check process nursery-alert-display with pidfile "/var/run/nursery-alert-display.pid"
# start program = "/sbin/start nursery-alert-display"
# stop program = "/sbin/stop nursery-alert-display"
# if failed port 4000 protocol HTTP
# request /
# with timeout 10 seconds
# then restart
check process nursery-alert-display with pidfile "/var/run/nursery-alert-display.pid"
start program = "/usr/bin/python /home/met/bin/nursery_alert/display/AlertListener.py"
stop program = "/bin/kill `cat /var/run/nursery-alert-display`"
if failed port 4000 protocol HTTP
request /
with timeout 10 seconds
then restart