For those of you who didn’t know, Munin is a free and open-source networked resource monitoring tool. It offers monitoring and alerting services for servers, switches, applications, and services. Munin uses the RRDtool to create graphs which are accessible over a web browser. Also, Munin can be configured to send alerts when some service/application etc. is not working and Munin will automatically send an additional email alert once the problem has been resolved.
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. I will show you through the step by step installation munin on ubuntu 14.04 server.
Install Munin on Ubuntu 14.04
Step 1. First make sure that all your system packages are up-to-date by running these following apt-get commands in the terminal.
sudo apt-get update
sudo apt-get upgrade
Step 2. Install Apache which is available from the ubuntu repositories.
apt-get install apache2
Step 3. Install Munin.
Install Munin and extra plugins using the following command:
apt-get install munin munin-node munin-plugins-extra
Step 4. Configuring Apache web server.
Next, you will be editing Munin’s apache configuration file to point apache in the right direction when you request the monitoring information:
mv /etc/munin/apache.conf /etc/munin/apache.conf.bak
Edit the ‘/etc/munin/apache.conf’ configuration file and add the following lines:
Options Indexes Includes FollowSymLinks MultiViews
Allow from all
CustomLog /var/log/apache2/munin.your-domain.com-access.log combined
Require all granted
Require all granted
Step 5. Configuring Munin server.
Create the directory path that you referenced in the munin.conf file and modify the ownership to allow munin to write to it:
sudo mkdir /var/cache/munin/www/
sudo chown munin:munin -R /var/cache/munin/www
Create a backup of the original Munin configuration file:
cp /etc/munin/munin.conf /etc/munin/munin.conf.orig
Edit the Munin configuration file and add/modify the following lines:
Create password for the Munin administrator user:
htpasswd -c /etc/munin/htpasswd munin
Step 6. Start Apache and Munin services.
service apache2 start
service munin-node start
If all is well, open Munin at http://munin.your-domain.com using ‘munin’ as username and the previously generated munin password as password and you will be able to access Munin graphs and data.
Congratulation’s! You have successfully installed munin. Thanks for using this tutorial for installing munin server monitoring on ubuntu 14.04 systems. For additional help or useful information, we recommend you to check the official munin web site.