Ubuntu install monit11/30/2023 Start program = "systemctl start mariadb" with timeout 30 seconds MariaDB check process mariadb with pidfile /run/mysqld/mysqld.pid If 5 restarts within 5 cycles then timeout If failed unixsocket /run/php/ then restart Stop program = "systemctl stop php7.0-fpm" Start program = "systemctl start php7.0-fpm" with timeout 30 seconds PHP-FPM check process php-fpm with pidfile /run/php/ If 5 restarts within 10 cycles then timeout If failed port 80 protocol http then restart If cpu usage > 80% for 5 cycles then alert Start program = "systemctl start nginx" with timeout 30 seconds You can now configure Monit to monitor your processes, file systems and resources by editing the /etc/monit/monitrc file.īelow are some example configurations: Nginx check process nginx with pidfile /run/nginx.pid Reload the Monit service with the following command: monit reloadĪnd you should be able to login to the Monit web interface at : localhost:2812 Use address localhost # only accept connection from localhostĪllow localhost # allow localhost to connect to the server andĪllow admin:monit # require user 'admin' with password 'monit' If you want to enable the Monit HTTP interface open the /etc/monit/monitrc file and uncomment the following lines: set httpd port 2812 and You can install the monit package from the official Ubuntu repositories by issuing the following command: sudo apt install monit Login to your VPS via SSH ssh _server Install Monit This guide should work on other Linux VPS systems as well but was tested and written for an Ubuntu 16.04 VPS. With Monit you can also monitor your network connections, CPU usage, RAM memory load average and much more. You can use Monit to stop or restart your web server if it is using too much resources, to monitor daemon processes, to monitor files, directories and get an email alert or perform a predefined action if they change. Monit is an open source tool for monitoring and managing, processes, files, directories and file systems on a UNIX system. In this article, we will show you how to install and configure Monit on Ubuntu 16.04.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |