Monit
De wikilivois
Aller à la navigationAller à la recherche
Installation
Package: monit
Configuration
<licode file=/etc/monit> set daemon 120 # check services at 2-minute intervals set logfile syslog facility log_daemon set alert admin@livois.com # receive all alerts
set httpd port 2812 and
allow localhost # allow localhost to connect to the server and allow 192.168.10.2 allow admin:monit # require user 'admin' with password 'monit'
check system www.livois.com
if loadavg (1min) > 4 then alert if loadavg (5min) > 2 then alert if swap usage > 25% then alert if cpu usage (user) > 95% then alert
check process mysqld with pidfile /var/run/mysqld/mysqld.pid
if cpu > 60% for 2 cycles then alert if totalmem > 200.0 MB for 5 cycles then alert if children > 10 then alert
check process apache with pidfile /var/run/apache2.pid
if cpu > 60% for 2 cycles then alert if cpu > 80% for 5 cycles then alert if totalmem > 200.0 MB for 5 cycles then alert if children > 10 then alert
check filesystem homefs with path /dev/sda3
if space usage > 80% for 5 times within 15 cycles then alert if inode usage > 10% then alert
check filesystem datafs with path /dev/sdb1
if space usage > 80% for 5 times within 15 cycles then alert if inode usage > 10% then alert
</licode>
Copyright
© 2011 Christophe de Livois
Vous avez l'autorisation de copier, distribuer et/ou modifier ce document suivant les termes de la GNU Free Documentation License, Version 1.2 ou n'importe quelle version ultérieure publiée par la Free Software Foundation; sans section invariante, sans page de garde, sans entête et sans page finale. Pour plus d'informations consulter le site de l'APRIL. |