Summary: In this post i tried to explain how to install Munin Monitoring system on linux server. There are a number of monitoring tools which can be used to Monitor server events and performance, One of them is Munin. The good aspect of munin i have selected for monitoring is its plugin features. You can install and configure a number of plugins according to your requirements. Although Munin did load server as it is creating a graphic output in run time. In combination with Monit you can have a better monitoring system for all your network.
The Installation and configuration are listed below.
The current installation is for RHEL-4 servers CentOS-5.8 x86_64.
Step-1:Enable The RPMforge Repository
rpm -Uvh rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
Step-2:Install And Configure munin
To install munin on RHEL-4, we do this:
yum install munin munin-node
Step-3: Then we create the system startup links for munin and start it:
chkconfig –levels 235 munin-node on
Note:If chkconfig is not working from your login then do the following
yourlogin# su –
enter the root password:XXXXXXX
and again apply the chkconfig command you will have that.
Step-4: We must edit the munin configuration file /etc/munin/munin.conf. We want munin to put its output into the directory /var/www/html/domaindirectory(servermonitoring)/munin, therefore we change the value of htmldir, and we want it to use the name servermonitoring instead of localhost.localdomain in the HTML output, therefore we replace localhost.localdomain with server1web. Without the comments,
Where to look for the HTML templates
a simple host tree
[server1.domain.com] #your domain name
Step-5: Next we create the directory /var/www/html/servermonitoring/munin and change its ownership to the user and group munin, otherwise munin cannot place its output in that directory. Then we restart munin:
mkdir -p /var/www/html/servermonitoring/munin
chown munin:munin /var/www/html/servermonitoring/munin
Step-6: After a few minuts open your browser and access the link your.domain.com/munin
Step-7: The server status will be publically available so you have to Password-Protect The munin Output Directory in order to protect your privacy.
Now it is a good idea to password-protect the directory /var/www/html/servermonitoring/munin unless you want everybody to be able to see every little statistic about your server.
To do this, we create an .htaccess file in /var/www/html/servermonitoring/munin:
AuthName “Members Only”
AuthUserFile /var/www/html/servermonitoring/.htpasswdrequire valid-user
Step-8: Then we must create the password file /var/www/html/servermonitoring/.htpasswd. We want to log in with the username admin, so we do this:
htpasswd -c /var/www/html/servermonitoring/.htpasswd admin
Step-9: Open Browser and type http://www.servermonitoring.com/munin
user name: admin
It’s All about the basic installation and configuration of the Munin Monitoring system.