Are you trying to install Munin on your CentOS Server? This guide you on how to do it properly.
Munin is a System Networking monitoring application which helps to display useful visualizations of resource usage.
Here at Ibmi Media, as part of our Server Monitoring Services, we regularly help our customers to perform CentOS related Installations and queries.
In this context, we shall look into how to install Munin on CentOS.
Munin is a free and open-source system, network and infrastructure monitoring Software written in Perl.
It uses RRDtool to create graphs, which are accessible over a web interface.
To start with, make sure that you have a domain which servers as the Munin Server lets say "munin.domain.com" as well as a Munin Client domain "munin-node.domain.com" mapped to the Server IP address in each case.
Then, log into your Server with an ssh tool such as putty and follow the steps below;
Munin can be easily installed using Fedora's EPEL repository available in RHEL 7.x/6.x/5.x and CentOS 7.x/6.x/5.x.
To install and enable Epel repository, use the wget command below;
For RHEL/CentOS 7 on 64-Bit, run the commands below;
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-9.noarch.rpm
rpm -ivh epel-release-7-9.noarch.rpm
For CentOS 6/RHEL on 32-Bit, run the commands below;
wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm
For CentOS 6/RHEL on 64-Bit, run the commands below;
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm
For RHEL/CentOS 5 on 32-Bit, run the commands below;
wget http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
rpm -ivh epel-release-5-4.noarch.rpm
For RHEL/CentOS 5 on 64-Bit, run the commands below;
wget http://download.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
rpm -ivh epel-release-5-4.noarch.rpm
Note that in Fedora Linux distribution, EPEL repository is available by default so therefore you do not need to install EPEL.
In Fedora systems, you can use the yum or DNF package manager to install it.
For CentOS Server, ensure that the system is updated before installing Munin by running the command below;
yum -y update
For Munin to work, it requires a web server such as Nginx or Apache in order to display its statistics information.
To install Apache which will server Munin graphs follow the instructions below.
To install Apache on RHEL, CentOS and Fedora systems, run the command below;
yum install httpd
TO install Apache on Fedora 22+ Releases, run the command below;
dnf install httpd
After the installation process, start and enable the web server service to start on boot automatically.
For RHEL, CentOS and Fedora systems, run the commands below;
service httpd start
chkconfig –level 35 httpd on
For RHEL/CentOS 7 and Fedora 22+ systems, run the commands below;
systemctl enable httpd
systemctl start httpd
Follow the instructions below to install Munin and Munin-Node on your system depending on the Operating System.
To install Munin and Munin-Node on RHEL, CentOS and Fedora systems, run the command below;
yum -y install munin munin-node
To install Munin and Munin-Node on Fedora 22+ Releases systems, run the command below;
dnf -y install munin munin-node
After the installation process, the following directories will be created;
/etc/munin/munin.conf : Munin master configuration file
/etc/cron.d/munin : Munin cron file
/etc/httpd/conf.d/munin.conf : Munin Apache configuration file
/var/log/munin : Munin log directory
/var/www/html/munin : Munin web directory
/etc/munin/munin-node.conf : Munin Node master configuration file
/etc/munin/plugins.conf : Munin plugins configuration file
To modify Munin configuration, open the configuration file "/etc/munin/munin.conf". In this instance, our server name is "munin.domain.com". So use as per your case.
The config file will look like this;
# a simple host tree
[munin.domain.com]
address 127.0.0.1
use_node_name yes
[…]
Now save and exit this file.
Next, to password protect Munin statistics with username and password, modifying Apache basic auth module is sufficient. To do this, run the command below;
htpasswd /etc/munin/munin-htpasswd admin
Now, restart Munin and enable it to start on boot time automatically.
On RHEL, CentOS and Fedora systems, run the commands below;
service munin-node start
chkconfig --level 35 munin-node on
For RHEL/CentOS 7 and Fedora 22+ systems, run the commands below;
systemctl enable munin-node
systemctl start munin-node
After Munin installation, you have to wait for about 30 minutes to allow it to generate graphs and display it.
Then open your web browser and enter the munin URL as per your case.
It will look like this;
http://munin.domain.com/munin
Then you can enter your login credentials previously created in the above steps.
Sometimes, you might not be prompted to enter a username and password, so your can modify munin configuration file "/etc/httpd/conf.d/munin.conf" to change the username from Muni to admin.
The config file will now look like this;
AuthUserFile /etc/munin/munin-htpasswd
AuthName “admin”
AuthType Basic
require valid-user
After this, restart Apache.
You can install Munin-node package by running the commands below;
yum install munin-node
dnf install munin-node [On Fedora 22+ versions]
apt-get install munin-node [On Debian based systems]
Next, open Munin node configuration file "/etc/munin/munin-node.conf" and add the Munin Server IP address to enable data fetching from the client.
Do this by running the command below;
vi /etc/munin/munin-node.conf
Now add Munin Server IP address as shown below;
# A list of addresses that are allowed to connect.
allow ^127\.0\.0\.1$
allow ^::1$
allow ^192\.168\.0\.103$
Next, restart the Munin client by running the command below;
For RHEL, CentOS and Fedora, run the commands;
service munin-node start
chkconfig –level 35 munin-node on
For RHEL/CentOS 7 and Fedora 22+ systems, run the commands;
systemctl enable munin-node
systemctl start munin-node
You need to modify Munin configuration file "/etc/munin/munin.conf" in order to configure the Munin Server to enable it connects to the Client Node.
Now add the following section to the client node with the server name and IP address as shown below;
# a simple host tree
[munin.domain.com]
address 127.0.0.1
use_node_name yes
[munin-node.domain.com]
address 192.168.0.15
use_node_name yes
Then, restart the Munin server and access munin via the url;
http://munin.domain.com/munin
This will display the new client node graphs.
This article will guide you through the steps to get Muni installed on CentOS Server.