Linux Mint

How to Install Monit on Linux Mint 21

Monit is a free and open-source web-based interface process supervision tool for Linux systems. It allows users to monitor the status of various system processes, services, and files, and automatically perform actions when certain conditions are met.

The Monit can be used to ensure that critical services are running and restart them if they fail and can also be used to monitor system resources such as CPU and memory usage. Installing Monit is a relatively simple process, and it can be installed via package manager on most Linux distributions so read this guide if you are looking forward to installing this tool.

Installing Monit on Linux Mint 21

One of the key features of Monit is its ability to automatically perform actions when certain conditions are met. For example, if Monit detects that a critical service is not running, it can automatically restart the service. This can help to ensure that critical services are always running and minimize downtime, to install it on Linux Mint just execute:

$ sudo apt install monit

Once this monitoring tool is installed successfully now it’s time to add the username and password along with the IP address to access it and or that open its configuration file by executing:

$ sudo nano /etc/monit/monitrc

After opening the configuration file of Monit just add the port number along with IP address of your device and give the suitable username and password:

set httpd port 2812

use address <Your-IP>

allow <username>:<password>

Once you are done with making changes to the configuration just start this tool:

$ sudo systemctl start monit

Next, once you have turned on the tool it’s time to enable it and for that purpose execute:

$ sudo systemctl enable monit

Once it’s up and running check if it’s responding to the IP given in its configuration file, to perform all that execute the below given commands:

$ sudo netstat -antup|grep -i monit

Text Description automatically generated

Now using your Linux Mint IP address along with the port given in the configuration file login to the web interface of this tool with the help of login credentials:

<your-ip-address>:<port-number>

Graphical user interface, text, application Description automatically generated

Once you have successfully logged in to the web interface you will come across the system resources usages:

Graphical user interface, text, application Description automatically generated

To have a more detailed look on the processes running on your Linux system just click on the running and a new tab will open having all the details on status:

Also, you can check the status of the system through command line as well by just executing:

$ sudo monit status

Now to remove this application from Linux Mint 21 then execute the below-mentioned command in case you installed it through apt:

$ sudo apt remove --autoremove monit -y

Conclusion

Overall, Monit is a powerful and useful tool that is designed to monitor and manage the status of various system processes, services, and files on Linux systems. Its ability to automatically perform actions and monitor system resources, as well as its web-based interface, make it a valuable tool for anyone who needs to manage and monitor Linux systems. Monit can help to ensure that systems are running smoothly.

About the author

Aaliyan Javaid

I am an electrical engineer and a technical blogger. My keen interest in embedded systems has led me to write and share my knowledge about them.