The sys admin's daily grind: Munin

The Raven


Ornithologists already know that magpies don't really deserve their reputation. The true kleptomaniac in the world of birds is the raven. And it's worthwhile for data dealers to make the acquaintance of Munin, a monitoring tool named after one fabled raven.

By Charly Kühnast

As far back as we can remember, humans have lived with domesticated animals. The Norse god Odin had a horse named Sleipnir, two wolves named Geri and Freki ("gluttonous" and "greedy"), and two ravens called Hugin and Munin. Odin sent the ravens out into the world every morning, and in the evening they returned to report what they had observed - a kind of early, feathered news ticker.

Memory

Whereas Hugin represents the flight of fancy - the here and now - Munin stands for memory, which is a fitting name for a piece of software that collects, processes, and archives system data. Munin [1] comprises two components: a server and several nodes. The software on each node collects data about its host and the services installed on it.

The server picks up the data periodically and uses RRDtool to process the data and generate detailed graphs like that shown in Figures 1 and 2.

Figure 1: The Munin server picks up system data collected from nodes and uses RRDtool to generate a neat overview.

Figure 2: Munin even provides color coding for more accessible graphs.

Setting Up the Bird

The minimal configuration file /etc/munin/munin.conf for the server looks like this:

dbdir    /var/lib/munin
htmldir  /var/www/munin
logdir   /var/log/munin
rundir   /var/run/munin

[gw.kuehnast.com] address 192.168.0.127

This example has only one node, gw. kuehnast.com. The node configuration is pretty exhaustive, but the defaults are useful. I only changed the user and group settings:

user root
group root
setsid yes

Of course, you need to let the server access Munin port 4949, allow ^192\. 168\.0\.42$. But how does Munin know which services and system states it should collect data from?

In this respect, the software follows the example of its feathered friend - it just reports everything that happens out there in the big wide world, or at least on its own nodes.

Before you start feeding your feathered friends, you might also want to read the Munin FAQ [2], which shows specific examples and answers questions about graphs, plugins, server configurations, and more.

INFO
[1] Munin: http://munin.projects.linpro.no
[2] Munin FAQ: http://munin.projects.linpro.no/wiki/faq
THE AUTHOR

Charly Kühnast is a Unix System Manager at the data center in Moers, near Germany's famous River Rhine. His tasks include ensuring firewall security and availability and taking care of the DMZ (demilitarized zone).