In this tutorial, we will show you how to install Monitorix on CentOS 8. For those of you who didn’t know, Monitorix is a free, open-source, lightweight system monitoring tool designed to monitor as many services and system resources as possible. It has been created to be used under production UNIX/Linux servers, but due to its simplicity and small size, you may also use it on embedded devices as well.
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 install Monitorix system monitoring tool on CentOS 8.
Install Monitorix on CentOS 8
Step 1. First, let’s start by ensuring your system is up-to-date.
sudo clean all sudo dnf update
Step 2. Installing Monitorix on CentOS 8.
Now we can install Monitorix packages using the following command:
sudo dnf install monitorix perl-CGI perl-HTTP-Server-Simple perl-rrdtool perl-Config-General perl-LWP-Protocol-https perl-LWP-Protocol-http10
You can verify the installed version of Monitorix by running:
$ monitorix -v Monitorix version 3.12.0 (29-Nov-2020)
Once successfully installed, now add Monitorix service to system start-up and start the service with the following commands:
sudo systemctl start monitorx.service sudo systemctl enable monitorx.service
Step 3. Configure Monitorix.
Monitorix is configured with a single plain text configuration file
/etc/monitorix/monitorix.conf. We will need to make a few changes to the configuration file before using Monitorix. Before making changes to the configuration file, it is recommended that you take a backup of the file. Run the following command to take the backup of the file:
cp /etc/monitorix/monitorix.conf /etc/monitorix/monitorix.conf.backup
Now open the Monitorix configuration file for editing:
In the configuration file replace the settings according to your environment:
# line 6: change to any title you like title = Monitorix# line 7: change to your hostname hostname = mon.idroot.us# line 8: background color of admin site theme_color = white# line 12: change network units to bps (default is Bytes per/sec)# デフォルトは Bytes per/sec netstats_in_bps = y# 28-43: change if you need <httpd_builtin> enabled = y host = port = 8080 user = nobody group = nobody log_file = /var/log/monitorix-httpd # if enable permission for admin site, add settings hosts_deny = all hosts_allow = 10.0.0.0/24 autocheck_responsiveness = y <auth> # if enable Basic auth, turn to [y] enabled = n msg = Monitorix: Restricted access htpasswd = /var/lib/monitorix/htpasswd </auth> </httpd_builtin># line 76: set kind of graphs you'd like to monitor # Graphs (de)activation # ----------------------------------------------------------------------------- <graph_enable> system = y kern = y proc = y hptemp = n lmsens = n gensens = n ipmi = n ambsens = n nvidia = n disk = n ..... .....
Once you are satisfied with the configurations, restart the Monitorix service:
sudo systemctl restart monitorix
Step 4. Configure Firewall.
If you are using a firewall, please open port 8080 to enable access using the command below:
sudo firewall-cmd --add-port=8080/tcp --permanent sudo firewall-cmd --reload
Step 5. Accessing Monitorix on CentOS 8.
Monitorix will be available on HTTP port 8080 by default. Open your favorite browser and navigate to
http://server-ip-address:8080/monitorix and choose the Graph and hit ok to view the graph.
Congratulations! You have successfully installed Monitorix. Thanks for using this tutorial for installing the Monitorix network monitoring tool on CentOS 8 systems. For additional help or useful information, we recommend you to check the official Monitorix website.