# Config set daemon 120 set logfile syslog facility log_daemon set mailserver localhost, smtp.free.fr set mail-format set alert monitoring@test.com set httpd port 8080 and allow login:password # Apache 2 check process httpd with pidfile /var/run/apache2.pid group apache start program = "/etc/init.d/apache2 start" stop program = "/etc/init.d/apache2 stop" if failed host 127.0.0.1 port 80 protocol http then restart if 5 restarts within 5 cycles then timeout if cpu is greater than 85% for 2 cycles then alert if cpu > 90% for 5 cycles then restart if children > 250 then restart # MySQL check process mysqld with pidfile /var/run/mysqld/mysqld.pid group database start program = "/etc/init.d/mysql start" stop program = "/etc/init.d/mysql stop" if failed host 127.0.0.1 port 3306 then restart if 5 restarts within 5 cycles then timeout # SSH check process sshd with pidfile /var/run/sshd.pid group ssh start program "/etc/init.d/ssh start" stop program "/etc/init.d/ssh stop" if failed host 127.0.0.1 port 1337 protocol ssh then restart if 5 restarts within 5 cycles then timeout # Postfix check process postfix with pidfile /var/spool/postfix/pid/master.pid group mail start program = "/etc/init.d/postfix start" stop program = "/etc/init.d/postfix stop" if failed port 25 protocol smtp then restart if 5 restarts within 5 cycles then timeout # FTP check process proftpd with pidfile /var/run/proftpd.pid group ftp start program = "/etc/init.d/proftpd start" stop program = "/etc/init.d/proftpd stop" if failed port 21 protocol ftp then restart if 5 restarts within 5 cycles then timeout # Disk check device sda1 with path /dev/sda1 if space usage > 85% then alert group system