In this tutorial we will show you how to install Monit on Ubuntu 18.04 LTS. For those of you who didn’t know, Monit is an open-source process monitoring tool for Linux operating system that monitors the system processes for problems. Monit conducts automatic maintenance and repair and can execute meaningful causal actions in error situations. Monit has built-in a lightweight HTTP(S) interface you can use to browse the Monit server and check the status of all monitored services. From the web interface, you can start, stop and restart processes and disable or enable monitoring of services.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation Monit on an Ubuntu 18.04 (Bionic Beaver) server.
Install Monit on Ubuntu 18.04 LTS Bionic Beaver
Step 1. First make sure that all your system packages are up-to-date by running these following apt commands in the terminal.
Step 2. Installing Monit on Ubuntu 18.04.
Download and install Monit using the APT command from the Ubuntu repository:
Once the installation is complete, edit file for Monit configuration. You can make a few changes to this configuration file for your requirement:
sethttpdport2812and # # set the listening port to your desire.
useaddresslocalhost # only accept connection from localhost
allowlocalhost # allow localhost to connect to the server and
allowadmin:monit # require user 'admin' with password 'monit'
allow@monit # allow users of group 'monit' to connect (rw)
allow@usersreadonly # allow users of group 'users' to connect readonly
*Note, the username is
admin and the password is
monit. You can also change the port number to a number of your choice.
*The configuration file is pretty self-explaining, if you are unsure about an option, take a look at the Monit documentation.
Next, enable Monit to start-up automatically on boot with the command below:
Monit will be available on HTTP port 2812 by default. Open your favorite browser and navigate to http://your-domain.com:2812 or http://your-server-ip:2812 and and then enter the credentials you created in conf above.
Congratulation’s! You have successfully installed Monit. Thanks for using this tutorial for installing Monit monitoring tool on Ubuntu 18.04 LTS Bionic Beaver system. For additional help or useful information, we recommend you to check the official Monit website.