Installing Monitorix on CentOS 7 (Step by Step guide)

How to install Monitorix on CentOS 7

Installing Monitorix on CentOS 7

Monitorix is an open source, lightweight service monitoring tool for Linux operating systems. It has been created to be used under production environment and can be used on embedded devices as well.

Monitorix comprised of two programs: “monitorix“, a collector, which is a Perl daemon working as a startup service, and a CGI script called “monitorix.cgi“. Monitorix includes its own HTTP server built in, so we don’t have to rely on the external web server.

It is currently in active development adding new features, new graphs and correcting bugs in the attempt to offer a great tool for daily systems administration of the best VPS hosting service.

Prerequisites

  • CentOS 7.3 (Operating system used here)
  • root privileges.

Features

  • System load average, active processes, per-processor kernel usage, global kernel usage and memory allocation.
  • Monitors Disk drive temperatures and health.
  • Filesystem usage and I/O activity of filesystems.
  • Network traffic usage.
  • System services including SSH, FTP, Vsftpd, ProFTP, SMTP, POP3, IMAP, POP3, VirusMail and Spam.
  • MTA Mail statistics including input and output connections.
  • Network port traffic including TCP, UDP, etc.
  • Apache statistics of local or remote servers.
  • MySQL statistics of local or remote servers.
  • Squid Proxy Web Cache statistics.
  • Monitor remote servers.
  • Ability to view statistics in graphs or in plain text tables per day, week, month or year.
  • Ability to zoom graphs for better view.
  • Ability to define the number of graphs per row.
  • Built-in HTTP server.

Step 1: Enable EPEL Repository

We need to download the file and then install it using RPM on your system to enable the EPEL repository. Use below links based on your Linux OS versions.

# wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
# rpm -ivh epel-release-latest-7.noarch.rpm
[root@webhostingchennai ~]# wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
--2018-04-20 12:57:06-- http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Resolving dl.fedoraproject.org (dl.fedoraproject.org)... 209.132.181.25, 209.132.181.24, 209.132.181.23
Connecting to dl.fedoraproject.org (dl.fedoraproject.org)|209.132.181.25|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 15080 (15K) [application/x-rpm]
Saving to: ‘epel-release-latest-7.noarch.rpm’

100%[================================================================>] 15,080 62.3KB/s in 0.2s

2018-04-20 12:57:07 (62.3 KB/s) - ‘epel-release-latest-7.noarch.rpm’ saved [15080/15080]

[root@webhostingchennai ~]# rpm -ivh epel-release-latest-7.noarch.rpm
warning: epel-release-latest-7.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:epel-release-7-11 ################################# [100%]
[root@webhostingchennai ~]#

Step 2: Install following required packages.

# yum install rrdtool rrdtool-perl perl-libwww-perl perl-MailTools perl-MIME-Lite perl-CGI perl-DBI perl-XML-Simple perl-Config-General perl-HTTP-Server-Simple perl-IO-Socket-SSL wget

Step 3: Download the latest version of ‘Monitorix‘ package.

# wget http://www.monitorix.org/monitorix-3.10.1-1.noarch.rpm

Once successfully downloaded, install it using the rpm command.

# rpm -ivh monitorix-3.10.1-1.noarch.rpm

Preparing... ########################################### [100%]
1:monitorix ########################################### [100%]

Step 4: Configure the firewall to allow 8080 port so that we can access the Monitorix dashboard from external machines.

# firewall-cmd --permanent --zone=public --add-port=8080/tcp
# firewall-cmd --reload

Now, add Monitorix service to system start-up and start the service with following commands.

# chkconfig --level 35 monitorix on
# service monitorix start
# systemctl start monitorix

Step 5: Look at the main configuration file ‘/etc/monitorix/monitorix.conf‘ to add additional settings according to your system and enable or disable graphs.

[root@webhostingchennai ~]# nano /etc/monitorix/monitorix.conf


# line 6: change to any title you like
title = Monitorix

# line 7: change to your own hostname
hostname = server.webhostingchennai.com

# line 8: background color of admin site 
theme_color = white 

# line 12: change network units to bps (default is Bytes per/sec) 
netstats_in_bps =y 

# line 28: change like follows 
<httpd_builtin> 
enabled = y 
host = 
port = 8080 
user = nobody 
group = nobody 
log_file = /var/log/monitorix-httpd

# set permittion for admin site
hosts_deny =all
hosts_allow =10.0.0.0/16 (your ip range)

After modifiying the configuration file, restart the monitorix.

[root@webhostingchennai ~]# systemctl restart monitorix

Now, the monitorix is ready to use, to access monitorix from browser

http://your-ip-add-ress:8080/monitorix
installing monitorix in centos 7

Hope this article helps your needs, please share your comments which help us in improving better.

For installing OpenNMS, click here

You may also like...

Leave a Reply

Your email address will not be published.