• Sales: 1-800-961-2888
  • Support: 1-800-961-4454

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 offical documentation here.

Example of Munin Monitoring:

Munin example

Installing Munin Server:

Ubuntu:

apt-get install munin-node
apt-get install munin-server

Centos/Fedora/Redhat:

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

Munin example 2



© 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

8 Comments

If people have followed your article on setting up cloud servers then all ports except for port 80 and the chosen port for SSH are blocked when they set up their iptables rules, So port 4949 should be opened in the iptables. You should mention it before starting the munin-node.

Thanks Sridhar. Updated the article to suggest adding the port in iptables.

Hi
I am trying to show Unbound extended statistics using Munin. I have done all required changes as per this link - http://www.unbound.net/documentation/howto_statistics.html but not able to see the additional graphs mentioned by this 'How To..' article. Please let me know if you can provide any help so that i can see those graphs also.

Thanks in advance
Naresh K.

Most extra graphs would be provided by either configuring an included plug-in or by adding one from Munin's site. The best reference on what's available and how to make them active would be Munin's wiki:

http://munin-monitoring.org/wiki/Documentation

Now that I've moved to a cloud db I'd like to get munin to monitor it's performance. Is that possible?

It's possible in theory. You'd set up a node's mysql plug-in to use a local copy of mysqladmin, then make sure to add an environment option for --host to point it to the Cloud DB host. I'll give it a try sometime to make sure it's that easy (you may need to install a perl library to support the MySQL module too).

The iptables link goes to a 404...

Thanks SCM. Fixed the link.

Add new comment