# apache monitrc snippet check process apache with pidfile /var/run/httpd.pid start program = "/etc/init.d/httpd start" stop program = "/etc/init.d/httpd stop" if failed host localhost port 80 protocol http and request "/" then restart if cpu > 80% for 5 cycles then restart # if totalmem > 200.0 MB for 5 cycles then restart if children > 100 then restart if loadavg(5min) greater than 10 for 8 cycles then stop if 3 restarts within 5 cycles then timeout group server check file apache_lib with path /usr/lib/apache/libhttpd.so if failed checksum and expect the sum df614b4b7fd65922ebcc02bacea13464 then unmonitor if failed permission 644 then unmonitor if failed uid root then unmonitor if failed gid root then unmonitor alert address@hidden on { checksum, permission, uid, gid, unmonitor } with the mail-format { subject: Alarm! } group server check file apache_bin with path /usr/sbin/httpd if failed checksum and expect the sum 6fcd7d4678801b8a2b58ad5ad76f8fc5 then unmonitor if failed permission 755 then unmonitor if failed uid root then unmonitor if failed gid root then unmonitor alert address@hidden on { checksum, permission, uid, gid, unmonitor } with the mail-format { subject: Alarm! } group server check file apache_ep with path /usr/lib/apache/libhttpd.ep if failed checksum and expect the sum df48b1d3f93382a595c0b3f7b584bb5e then unmonitor if failed permission 755 then unmonitor if failed uid root then unmonitor if failed gid root then unmonitor alert address@hidden on { checksum, permission, uid, gid, unmonitor } with the mail-format { subject: Alarm! } group server