Some Munin Notes

Munin – its pretty handy for monitoring stuff over time to view trends. Some notes to get it up and running with a minimal config:

Install munin on monitoring server:
apt-get install munin

vi /etc/munin/munin.conf
Add something like:
use_node_name yes
use_node_name yes

Group by something sensible, i.e server type, location, domain?

Install a webserver to show the results:
apt-get install apache2
To make it easy for you, the apache conf is included:
cat /etc/munin/apache.conf >> /etc/apache2/apache2.conf
/etc/init.d/apache2 restart
go to http://ip/munin to test

Setting up the servers to be monitored (nodes):
apt-get install munin-node

vi /etc/munin/munin-node.conf

#allow the monitoring server access
allow ^2\.11\.1\.22$
/etc/init.d/munin-node restart

It runs on port 4949 by default- some firewall config maybe necessary

A few things that you might want to do but I’m not going to:
1. Set up email notifications. Remember munin is cron’d every 5 minutes and doesnt keep a record of mails its sent. You could get spammed!:

in munin.conf:
contact.tom.command mail −s "Munin notification"
use_node_name yes
load.warning 2
load.critical 4
contacts tom

2. Data can be aggregated onto graphs, i.e plotting the traffic of all web servers onto a single graph. Useful – google it.

3. Additional plugins
All plugins are located in /usr/share/munin/plugins
When munin is installed, it automatically checks your environment and activates plugins that are relevant.

To show which plugins will work in your environment and which are being used:
munin-node-configure –suggest

To activate a plugin, just symlink it to /etc
ln -s /usr/share/munin/plugins/plugin_name /etc/munin/plugins/plugin_name
/etc/init.d/munin-node restart

Check out additional plugins:

Or write one yourself…..

You can leave a response, or trackback from your own site.

Leave a Reply