Install Munin On Ubuntu 10.04

Munin is a networked resource monitoring tool that can help analyze resource trends and “what just happened to kill our performance?” problems. It is designed to be very plug and play. A default installation provides a lot of graphs with almost no work.


To start this tutorial you will need a web server, both Lighttpd and Apache will do the job. For this tutorial I will use Lighttpd which is available from the Ubuntu Repositories.

sudo aptitude install lighttpd

You will also need PHP installed on the system.

sudo aptitude install php5-cgi

Since Munin will be running on only one system we will need the master and client installed on the same system.

sudo aptitude install munin munin-node

If you would like to have munin notify you when something moves from OK to another state (or back again) you’ll want to set up email notifications. you’ll need to do this by editting the /etc/munin/munin.conf file.

sudo nano /etc/munin/munin.conf and insert the following lines according to the instructions in the comments: # Drop somejuser@fnord.comm and anotheruser@blibb.comm an email everytime # something changes (OK -> WARNING, CRITICAL -> OK, etc) #contact.someuser.command mail -s "Munin notification" somejuser@fnord.comm #contact.anotheruser.command mail -s "Munin notification" anotheruser@blibb.comm contact.yourname.command mail -s "Munin notification"

And now you can start Munin.

sudo start munin-node sudo apache2ctl graceful After installing munin, you can access it from But, it's forbidden if accessed from another like domain/munin. To solve this problem, edit /etc/munin/apache.conf. Change Allow from ::1 into Allow from all Restart your apache and see if munin can accessed now.

Munin can be accessed by pointing the web browser to:

Remember that it will take a long time for Munin to display any meaningful information, be patient.

Password-Protect The munin Output Directory

Now it is a good idea to password-protect the directory /var/www/ unless you want everybody to be able to see every little statistic about your server. To do this open /etc/munin/apache.conf and activate the following lines: AuthUserFile /etc/munin/munin-htpasswd AuthName "Munin" AuthType Basic require valid-user nano /etc/munin/munin-htpasswd Then we must create the password for /etc/munin/munin-htpasswd file. We want to log in with the username Munin, so we do this: htpasswd -c /etc/munin/munin-htpasswd Munin Enter a password for Munin, restart your apache and you're done!


Then, we can enable some plugins (more plugins can be found here and here). To do this, we need to create a symbolic link per each plugin we want to activate. I’m going to enable apache and mysql modules, but you are free to enable the modules you need:

$ cd /etc/munin/plugins
$ sudo ln -s /usr/share/munin/plugins/apache_* .
$ sudo ln -s /usr/share/munin/plugins/mysql_* .

Each time a module is enable or disable, we need to restart the service, so we can do the following:

$ sudo /etc/init.d/munin-node restart

Also, it is recommended to reassign all files on the htmldir to munin user and group by doing:

$ sudo chown munin.munin -R /var/www/munin
And then, to avoid waiting 5 minutes until munin cron runs again, we force it by:

$ sudo /usr/bin/munin-cron --force-root

Add new comment

Filtered HTML

  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.