Posted by chris on Fri 26 Aug 2005 at 15:41
From the package description: Munin is a highly flexible and powerful solution used to create graphs of virtually everything imaginable throughout your network, while still maintaining a rattling ease of installation and configuration.
Getting munin
Munin is in the Debian archive in two parts - munin - the part that creates the monitoring graphs (you can think of this as the munin server), and munin-node - the munin client program.
So - if monitoring one machine installation should be a simple:
apt-get install munin munin-node
Configuration
Configuration is conducted via configuration files inside the directory /etc/munin:
The configuration of the grapher/collector.
The default configuration is set up to monitor the local machine. Things that can be set here (defaults shown below)
# The data storage area dbdir /var/lib/munin # The place to put the generated web pages htmldir /var/www/munin # The log files logdir /var/log/munin # Temporary run files (pid file etc) rundir /var/run/munin # Where to look for the HTML templates tmpldir /etc/munin/templates
You can also setup hosts to check here - the default is for localhost:
[localhost.localdomain]
address 127.0.0.1
use_node_name yes
Examples are given in this file for adding other hosts.
Setup of the node which server addresses can connect. For monitoring just your local machine the default is fine.
Configuration of the plugins for this node. The syntax is simple:
[pluginname] param val param val
You can set user, group, etc for each plugin.
Allowed parameters are described at the top of the file.
A directory in which each file is a symlink to a real plugin in /usr/share/munin/plugins.
Any plugin linked in here will be checked for and displayed in the resulting web pages.
Add the plugins you want (e.g. if running exim4 then I'd add exim_mailqueue and exim_mailstats).
You'll need to set user/group rights in the munin-node conf file.
Most plugins can be run from the command line with the autoconf param to check if they can run - e.g.
./exim_mailstats autoconf yes
Running munin
Munin sets up a cron job via the file /etc/cron.d/munin which will run /usr/bin/munin-cron.
Running this file will poll each of the nodes - and then will create the graphs in /var/www/html which you can then browse under http://hostname.example.com/munin.
Examples can be found here: http://www.linpro.no/projects/munin/example/.
Keeping an eye on these graphs will help you to keep your server running healthily - and can give advance warning of problems to come.
This article can be found online at the Debian Administration website at the following bookmarkable URL:
This article is copyright 2005 chris - please ask for permission to republish or translate.