forked from perusio/monit-miscellaneous
-
Notifications
You must be signed in to change notification settings - Fork 0
/
thttpd
33 lines (30 loc) · 1.17 KB
/
thttpd
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
27
28
29
30
31
32
33
# -*- mode: conf; mode: flyspell-prog; mode: autopair; ispell-current-dictionary: american -*-
### Monitoring thttpd.
check process thttpd with pidfile /var/run/thttpd.pid
group alt-webserver # alternative webserver group
start program = "/etc/init.d/thttpd start"
stop program = "/etc/init.d/thttpd stop"
## Test port 8080 and request the server status page. Restart if the
## server is down.
if failed port 8080 protocol http then restart
## If the restarts attempts fail then alert.
if 3 restarts within 5 cycles then timeout
depends on thttpdd
depends on thttpd_init
alert root@localhost only on {timeout}
## Test the thttpd binary.
check file thttpdd with path /usr/sbin/thttpd
group alt-webserver
if failed checksum then unmonitor
if failed permission 755 then unmonitor
if failed uid root then unmonitor
if failed gid root then unmonitor
alert root@localhost
## Test the init scripts.
check file thttpd_init with path /etc/init.d/thttpd
group alt-webserver
if failed checksum then unmonitor
if failed permission 755 then unmonitor
if failed uid root then unmonitor
if failed gid root then unmonitor
alert root@localhost