Munin is a data collection, graphing and limited monitoring system written in Perl that is built on top of RRDTool.
Typically, sysadmins use Munin for graphing system performance, alongside another dedicated monitoring system like Nagios.
If you follow along with the munin INSTALL document, you automatically get about 100 system and application graphs with no manual configuration except double-checking your hostname setup and http document root in munin.conf.
After a few days, I think most people find only a few graphs to be useful, including the memory usage and load graphs. At that time you can remove the symlinks made during the install process for items not worth monitoring.
Some minor tweaking of the plugin scripts, written in sh, help to make the graphs more readable. For example, commenting out the Apache free slots code in apache_processes improves chart readability by just showing busy and idle processes, instead of scaling to show the maximum limit, which is 256 slots for Apache 1.3, or ServerSlots for Apache 2.)

Munin apache_processes chart with proper scaling
Also, forcing the memory script to use total physical RAM * 1.1 provides a common y-axis value, improves readability in the chart area, and minimizes fluctuations due to any swap activity. See “Adjusting the Scale of Munin Graphs” for how to do that.

Munin memory chart with forced RAM total on y-axis. (Getting rid of swap_cache (dark orange) in linux requires a reboot.)
I just finished installing munin 1.4 alpha from source on a Centos 4.5 machine, since recent binary packages have dependency issues on this server.
However, there were a couple issues to overcome:
- munin-graph could not find $libdir/VeraMono.ttf, causing the graph labels and legend to not be displayed. Changing the single-quotes to double-quotes everywhere VeraMono.ttf is mentioned in Munin/Master/GraphOld.pm allows $libdir to get string-interpolated properly.
- below is a munin-node startup script that I adapted from a Sun version:
#!/bin/sh
prog="munin-node"
path="/opt/munin/sbin"
mkdir -p /var/run/munin
case "$1" in
'restart')
#stop the daemon, then fall through to the start
/usr/bin/pkill -x $prog
$path/$prog
;;
'start')
$path/$prog
;;
'stop')
/usr/bin/pkill -x $prog
;;
*)
echo "Usage: $0 { start | stop | restart }"
exit 1
;;
esac
exit 0
It was worth installing.
Shortly after installing Munin, it captured an abuse event that caused serious swapping (see above memory graph.) Using the graph timescale, I was able to narrow down which user caused it, and configured the application to not allow that again.
Here are the commands to create and install your own munin monitoring script:
cd /opt/munin/lib/plugins
cp uptime my_script
vi my_script
MUNIN_LIBDIR=/opt/munin/lib ./my_script
ln -s /opt/munin/lib/plugins/my_script /etc/opt/munin/plugins/my_script
service munin-node restart
sysmonblog.co.uk: Adjusting the Scale of Munin Graphs
Cacti Plugin for Nagios



We thought that the apache memory usage would work better using the sun version…
I have struggled forever with this memcached plugin for munin: http://exchange.munin-monitoring.org/plugins/memcached-multigraph/details I keep getting this error with it on Debian:
2010/09/13-19:19:23 [8430] Service ‘memcached_multi_bytes’ timed out.
do you have any idea what could be wrong?