![]() ![]() ![]() You can install it with the following command: apt-get install monit -y apt-get update -y Step 2 – Install Monitīy default, Monit is available in the Ubuntu 20.04 default repository. Once you are logged in to your Ubuntu 20.04 server, run the following command to update your base system with the latest available packages. Connect to your Cloud Server via SSH and log in using the credentials highlighted at the top of the page. Create a new server, choosing Ubuntu 20.04 as the operating system with at least 2 GB RAM. Step 1 – Create an Atlantic.Net Cloud Serverįirst, log in to your Atlantic.Net Cloud Server. A root password configured on your server.A fresh Ubuntu 20.04 VPS on the Atlantic.Net Cloud Platform.In this tutorial, we will learn how to install the Monit monitoring tool on Ubuntu 20.04. Monit also sends customizable alert messages as notifications regarding error conditions. An easy-to-configure control file, which is based on a token-oriented, free-format syntax, is used for controlling Monit. Just as an example, Monit can start a process if it ceases to run, restart a process if it fails to respond, and halt a process if it uses too many resources. Monit not only undertakes automatic repair and maintenance, but also executes meaningful casual actions when error situations arise. info : 'apache' start: /etc/init.Monit is a utility to designed to manage and monitor filesystems, directories, files, programs, and processes over a UNIX system for changes in size, checksum, and timestamp. See the log file: :~$ sudo tail -f /var/log/monit.log The Apache service will be automatically started after two minutes. Wait for two minutes and again refresh the monit web interface page. error : 'apache' process is not runningĪs you seen in the above result, the apache service is not running. Open Monit web interface to see the changes.Īnd refer the log file: :~$ sudo tail -f /var/log/monit.log Stop the apache service using the following command: :~$ sudo /etc/init.d/apache2 stop Let us stop the apache service and see what will happen? Refer the following monit official documentation page for details about adding services. You can add more services such as ftp, ssh, nginx etc and monitor them periodically. info : Starting monit daemon with http interface at In Ubuntu/Debian: :~$ sudo tail -f /var/log/monit.log error : monit: Denied connection from non-authorized client In CentOS/RHEL: ~]# tail -f /var/log/monit The apache service entry will found there.Īlso Check log file to verify the services. ![]() Navigate to from your browser and see the changes. ![]() Now restart the monit service: :~$ sudo /etc/init.d/monit restart Once you added all the services, check the monit configuration file for any syntax error. Stop program = "/etc/init.d/apache2 stop" Start program = "/etc/init.d/apache2 start" with timeout 60 seconds Open the file /etc/monit/monitrc and add the following lines at the bottom: :~$ sudo vi /etc/monit/monitrcĬheck process apache with pidfile /run/apache2.pid Or add the required service entries at the bottom of the file.įor instance let us add apache service in Ubuntu/Debian systems. Just uncomment them to start monitor that service. You can find some default entries for services in the monit configuration file under Services section. Now add some services which you want to monitor in monit configuration file. Starting monit: monit: generated unique Monit id 685652473acf3e05b92609d989df475d and stored to '/root/.monit.id' Once you done, start monit service and let it to start automatically on every reboot. In Ubuntu/Debian systems: :~$ sudo vi /etc/monit/monitrc 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'Īllow # allow users of group 'monit' to connect (rw)Īllow readonly # allow users of group 'users' to connect readonly Uncomment the following section in the configuration file: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |