How to install Munin Monitoring systems


We will provide instructions for Installing Munin Monitoring Systems on Ubuntu and Centos/Fedora/Redhat. Munin is a monitoring system that will provide you with your Server stats on a simple to read website.

There are two parts of Munin Monitoring Software, Munin Master and Munin node. Muninin Server is the software website and configuration for what stats are pulled and what domains are monitored. Munin Node is the actual software that monitors the server and produces the stats for Munin Master.

You can find official documentation here.

Example of Munin Monitoring:

Example of Munin Monitoring

Installing Munin Server:

Ubuntu:

sudo aptitude update
sudo aptitude install munin munin-node

Centos/Fedora/Redhat:

To add the EPEL repository to your yum list. run:

sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

With the repository in place, install munin with:

yum install munin-node
yum install munin-server

Suse:

Install munin using the YaST -> Software -> Software Management or by using zypper:

zypper in munin munin-node

Configuring munin server:

munin.conf is the configuration file for all scripts of Munin Master. It is ussually located in /etc/munin/. The programs using it are munin-update, munin-graph, munin-limits and munin-html.

Configuring munin.conf: Official Documentation: munin-monitoring.org/wiki/munin.conf

Two parts you need to worry about in the munin.conf file. First Server Variables, Second is Host settings.

Server variables:

Set htmldir to a directory within your document root (ie. /var/www/munin or /var/www/html/munin)

Munin.conf snippet:

# The next three variables specifies where the location of the RRD
# databases, the HTML output, and the logs, specifically.
# They all must be writable by the user running munin-cron.
dbdir   /var/lib/munin
htmldir /var/www/munin
logdir  /var/log/munin
rundir  /var/run/munin

Host Definitions:

Find the section in brackets: [foo.example.com] This sets your host .

For localhost use 127.0.0.1, for other external nodes(servers) use the ip address x.x.x.x.

[server-name]
    address 127.0.0.1
    use_node_name yes

Configruing munin-node.conf:

Official Documentation: http://munin-monitoring.org/wiki/munin-node.conf

You need to set the user and group in the munin-node.conf file.

Here is an example of the munin-node.conf file.

Munin-node.conf snippet:

log_level 4
log_file /var/log/munin/munin-node.log

# Which port to bind to;
port 4949
pid_file /var/run/munin/munin-node.pid
background 1
setseid 1

host *
user root
group root
setsid yes

Remember to open port 4949 in iptables so the munin node can receive connections from the munin master.

Setting up munin-node to load on boot.

Munin-node is what grabs the data for the node(server). We need to set this to load on each server you are running.

To set munin-node to run at boot:

Centos/Fedora/RedHat:

chkconfig --add munin-node

Next start munin-node:

service munin-node start

Ubuntu / Debian:

update-rc.d munin-node defaults

Next start munin-node:

/etc/init.d/munin-node

Munin-node can take up to 24 hours to start showing data.

Suse:

insserv munin-node

Next start munin-node:

/etc/init.d/munin-node

Using Munin:

To view the munin site browse to the ip/htmldir variable in your /etc/munin/munin.conf file.

Example:

htmldir /var/www/munin

Then visit your munin page by entering its URL in a browser: http://[ip address]/munin

overview example



Was this content helpful?




© 2011-2013 Rackspace US, Inc.

Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License


See license specifics and DISCLAIMER