set daemon 120
set eventqueue
set mail-format { from: server@vojtaweb.cz }
set alert panterek.ladik@seznam.cz
set httpd port 81 and
check system vojtaweb.cz
if loadavg (5min) > 4 then alert
if loadavg (10min) > 2 then alert
if memory usage > 98% then alert
if cpu usage (user) > 70% then alert
if cpu usage (system) > 30% then alert
if cpu usage (wait) > 20% then alert
check process apache with pidfile /var/run/apache2.pid
start program = "/etc/init.d/apache2 start"
stop program = "/etc/init.d/apache2 stop"
if cpu > 70% for 2 cycles then alert
if cpu > 90% for 5 cycles then restart
check device datafs with path /dev/xvda
if space usage > 80% for 5 times within 15 cycles then alert
if space usage > 99% then stop
if inode usage > 30000 then alert
if inode usage > 99% then stop
group server
check process mysql 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 alert
check host bobinka.eu with address bobinka.eu
if failed icmp type echo count 3 with timeout 15 seconds for 5 cycles then alert
if failed port 80 proto http for 5 cycles then alert
if failed port 22 proto ssh for 5 cycles then alert