Skip to main content

Simple monitoring tool for your server – Munin tutorial need to explain how important is to monitor the performance of your server, it can help you understand which process is killing your server’s performance or even help to understand what’s going on when you don’t see any major slowdown (relay for spam? disk full? etc…) in an easy way through a Web Interface.

There are several tools to do that, such as Cacti, Munin, or more entreprise oriented softwares such as Nagios, Zenoss or even monitoring from 3rd party cloud service such as Zealion (Very fancy one with easy tools to dig into the records).

Most probably the easiest tool to use is Munin and you may have already seen some graphs from this tool:

Sounds familiar?

So here is how to install it.


First of all, I assume you have a LAMP server working or similar. If you don’t have, please read my previous tutorial on how to install Apache with MySQL and PHP.

As most of similar tools, you can run the monitoring server on a different machine that you want to monitor, or attach several machines to main server.

If you have only in server, in root, simply run:

So now let’s see how to tweak a bit better the configuration by using a subdomain to access the stats, change server name, refresh time rate, adding a server to the pool, etc…



Per default, munin store its html files in /var/cache/munin/web that you may want to change to /var/www/munin directly or create a subdomain to access directly to this folder.

I prefer to use the subdomain way to be able to access the graphs through

Here is my very simple virtualhost (Vhost):

Once modified for your server, don’t forget to add a A redirection on your DNS server or registrar and to restart apache.

Also, munin will monitor locahost ( under the name “localhost.localdomain”. You may want to change this value to better identify your servers among themselves too.

Still in root (su/sudo), type:

and find the lines:

then replace localhost.localdomain with the name you want. (Freedif in my case)

You can now save the file (CTRL +X) and restart munin node:

By default, the graphs are refreshed every 5mn, if you want to decrease or increase this length, you can still modify the munin cron entry by modifying the file /etc/cron.d/munin.


Add a node

And if you want to monitor another machine, you need to install munin-node on this machine.

In root:

Next, you will need to edit the munin-node.conf file to specify your monitoring server IP to allow the connection.

Still in root:

and find the line

to replace with your IP (Keep the same syntax)

and restart the node.

Now on your monitoring server, you will need to modify /etc/munin/munin.conf to add your node.

and after your initial host tree:

And add your second host below:

After your modification done, you will need to restart apache. (in root)

You should now have your 2 servers being monitored.

(Note that it should take 5min to see the update)


Leave a Reply

Your email address will not be published. Required fields are marked *