summaryrefslogtreecommitdiff
path: root/simple_apache.monit
blob: 1d366cc97764cb6a9ed631536abf8cfb3dd155c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
# A very simple monit test. 

# If the apache daemon isn't running, remove the healthcheck script's
# healthy file. This will trigger the failover.
check process apache with pidfile /var/run/apache2.pid
    if not exist then exec "/bin/rm /opt/linaro-healthcheck/healthy"
    if failed port 80 then exec "/bin/rm /opt/linaro-healthcheck/healthy"

# If the apache error log contains "resuming normal operations", the
# daemon is up and running so create the healthy file
check file error_log with path /var/log/apache2/error.log
    if match " -- resuming normal operations" then exec "/usr/bin/touch /opt/linaro-healthcheck/healthy"