
Monit is an open-source utility program used to manage and monitor resources and services on Linux systems. Some services and resources managed by Monit are CPU usage, memory usage, server uptime, network connections, and server applications services. It also makes sure that all running services are always healthy by restarting services that stop or encounter errors during operation. These errors and other important events can be automated to send notifications with certain instances or occurrences. In this article, you will learn how to install and configure Monit on Ubuntu 20.04.
Install Monit.
Enable Monit service to run on system boot automatically.
Check the status of Monit.
Enable Monit web interface by editing the default configuration file /etc/monit/monitrc.
Find the below lines.
Uncomment them and modify the admin password monit with your own. Save and close the file.
Test the if the configuration file has no errors.
Restart the Monit service to apply the changes.
Allow Monit port service in the firewall.
Go to your web browser and access the Monit web interface via http://serverIP:2812. For example:
You will be prompted to log in. Use admin as the username and StrongPassword as the password. Modify password with the actual value you set during configuration.
Monit restarts any services that stop by continuously monitoring all services in your system that have monitoring enabled. To enable monitoring of a service, first install the service, then create a symbolic link of available service configurations to /etc/monit/conf-enabled/. An example using nginx:
Restart the Monit service to apply the changes.
Check the status of the added services.
You have successfully installed and configure Monit on Ubuntu 20.04. You can now install more services and add them to be monitored.
For more information on Monit, please see the official documentation.
0 Comments
Be the first to comment and share your perspective with the community.