HowTo: Installing Munin on Debian / Ubuntu

| No Comments

This is a “quick start” to installing munin on a set of Debian / Ubuntu based servers.It covers just enough to get you started … check the munin documentation for additional things you might want to do.

Jargon

For the purpose of this howto:

  • Clients - the servers/machines that you want to monitor. There will typically be many of these.
  • Master - the (single) server that collects data from all the clients, records and graphs it.

Also note that client.host.name should be replaced with the IP or the fully qualified domain name (fqdn). Eg, web1.example.com or web2.example.com etc.

Similarly, with master.host.name

Client Servers to Monitor

On each client machine you want to monitor:

sudo apt-get install munin-node

Firewalling

Ensure any firewall configurations allow port 4949 access to this machine from the Master machine.The way to test it is:

ssh master.host.name
telnet client.host.name 4949
Trying 1.2.3.4...
Connected to client.host.name.
Escape character is '^]'.
# munin node at client.host.name

Press [return] a few times to quit. Or try entering “list”, or “help”.

Access Control

Independent of any firewall rules you may have, Munin also has it’s own access control.

ssh client.host.namesudo
vi /etc/munin/munin-node.conf

At the bottom of this file you have an additional layer of access control. Add the IP address for the Master machine that will be doing the monitoring.

allow ^1\.2\.3\.4$

Note that this is a regex, so the above matches exactly the ip 1.2.3.4

The line below would allow any ip address that starts 1.2.3.

allow ^1\.2\.3\.\d+$

And the next line would allow ANY ip address to connect (subject to your firewall rules of course):

allow ^

There are more things you can do with your munin-node.conf but this covers enough to get you started.

Having edited munin-node.conf, you need to restart munin. Remember to do this on each and every server you want to monitor.

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

Master Monitoring Server

You only need one master monitoring server.

ssh master.host.name
sudo apt-get install munin
sudo vi /etc/munin/munin.conf

Then add a section for each client machine you want to monitor

[client1.host.name]
address client1.host.name
use_node_name yes

[client2.host.name]
address client2.host.name
use_node_name yes

[client3.host.name]
address client3.host.name
use_node_name yes

Again, there is plenty more you can do, but the above should be enough to get started.

And Wait…

Munin updates every five minutes. Go make a cup of tea!On the Master server, try:

sudo tail -f /var/log/munin/munin-update.log

and on the client servers, try:

sudo tail -f /var/log/munin/munin-node.log

You should get some sort of message within the next five minutes.While you are waiting, a quick read of the FAQ might be in order.

Feedback / Comments

Any feedback most welcome. Post a comment, or send us an email.

Leave a comment

About this Entry

This page contains a single entry by snork published on July 21, 2008 9:07 PM.

Keeping ahead of the IT curve was the previous entry in this blog.

System Monitoring Shootout Seven is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.