sentoo
19/12/2012, 20h34
J'ai fait toute l’installation mais monit start all et monit reload ne marche pas. ça donne l'erreur -bash: monit: command not found
cd /home/utiles/ wget http://mmonit.com/monit/dist/monit-5.3.2.tar.gz tar zxvf monit-5.3.2.tar.gz cd monit-5.3.2 ./configure make && make install mv /home/utiles/monit-5.3.2/monitrc /home/utiles/monit-5.3.2/monitrc_default
set daemon 60 # check services at 1-minute intervals with start delay 120 # Démarre après 2 minutes set logfile syslog facility log_daemon # # ############################################## ## Services ############################################## set mailserver localhost set mail-format { from: monit@$HOST subject: [monit] $SERVICE: $EVENT subject: $SERVICE $EVENT at $DATE message: $EVENT Service $SERVICE Date: $DATE Action: $ACTION Host: $HOST Description: $DESCRIPTION } set alert monemail@domaine.com ## Services check system localhost if loadavg (1min) > 4 then alert if loadavg (5min) > 4 then alert if memory usage > 75% then alert if cpu usage (user) > 70% then alert if cpu usage (system) > 30% then alert if cpu usage (wait) > 20% then alert # Apache : le répertoire du pid apache se trouve dans mon cas ici : /home/log/httpd/httpd.pid check process httpd with pidfile /home/log/httpd/httpd.pid group apache start program = "/etc/init.d/apache start" stop program = "/etc/init.d/apache 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 # Disk check device md1 with path /dev/md/1 if space usage > 90% then alert group system
monit start all
monit reload