monit check program for custom script to monitor php5-fpm status page and nginx status page. Download the monit package: Here I use the version monit-5.5.tar.gz My install location /opt/install Before install monit, install the dependencies: yum install gcc pam-devel openssl-devel make It takes some time to finish After the successful installation, unzip the monit package tar xvfz monit-5.5.tar.You can open in browser to see visual graphs! TODO "http_password" => "easyengine", Setup CronĪdd following line to cron: * * * * * php /var/> /var/log/monit-graph.log View Graphs Open config.php and adjust following values: "url" => "localhost:2812", You can use commercial version M/Monit for a lot many features or free script monit-graph Install monit-graph cd /var/www//htdocs You may also open :2182 in your browser to use web-based interface. Install via ports, this will compile monit from source. Monit is available in Ubuntu and Debian repositories, so. Install via packages, the pre-compiled binary is quick to install. Run command monit status, it should something like: The Monit daemon 5.13 uptime: 2m Monit is an open source proactive monitoring tool for Linux operating system which helps you to monitor system process using the web browser and also whenever requires it automatically do the maintenance or repair of a particular process (i.e., restarting the service) in such a way that it can be brought back online. This article will guide you through basic Monit setup on Ubuntu/Debian operating systems. Then start monit using service monit start Verify Here are the commands to launch to install monit : sudo apt-get -y. Startįirst test your config using monit -t command. For this we indicate the evaluation criteria and the actions to take. This tutorial shows how to install and configure monit as Process supervision on Debian or Ubuntu Linux. You can use Systemd, daemontools or any other such tool for the same purpose. It comes with the ability to restart services which have failed. Also, change numbers 6 and 4 in loadavg lines based on number of CPU cores on your system. Monit is a free and open source software that acts as process supervision. You may also wish to change username admin and password easyengine. If loadavg (5min) > 4 for 2 cycles then alert If loadavg (1min) > 6 for 2 cycles then alert If cpu usage (user) > 70% for 2 cycles then alert If memory usage > 80% for 2 cycles then alert Set eventqueue basedir /var/monit slots 5000Ĭheck process mysqld with pidfile "/var/run/mysqld/mysqld.pid"Ĭheck process php5-fpm with pidfile "/var/run/php5-fpm.pid"Ĭheck process nginx with pidfile "/var/run/nginx.pid" cd ~Īdd/Update following in /etc/monit/monitrc #Monitoring Interval in Seconds Following lines will install Monit 5.14 for Ubuntu 64-bit. Go to and pick correct binary for your system. Following installs Monit 5.3 on Ubuntu 12.04.
0 Comments
Leave a Reply. |