Skip to content
Evan Carmi edited this page Mar 24, 2011 · 2 revisions

Setting up Munin

[Munin] (http://munin-monitoring.org/) is a resource monitoring tool that we use to monitor roomtrol devices.

To setup munin on a client roomtrol device, first install the munin-node package on it:

sudo apt-get install munin-node

Next, to allow your server to communicate with this client add the following line to /etc/munin/munin-conf :

allow ^129\.133\.124\.145$

where 129.133.127.152 is the ip address of the server you want to view the munin results on. Don't forget to restart the munin daemon with

sudo restart munin-node

To confirm that this is setup properly, from the server machine do:

$ telnet roomtrol-sc509a.class 4949
  Trying 129.133.127.4...
  Connected to roomtrol-sc509a.class.wesleyan.edu.
  Escape character is '^]'.
  # munin node at roomtrol-sc509a.wesleyan.edu

here we see we got a response from munin node, so we have it setup.

  • Setup Server *

On the server add the following to /etc/munin/munin.conf

[imsvm.production]
    address 129.133.124.145
    use_node_name yes

[sc509a.production]
    address 129.133.127.4
    use_node_name yes
    contacts micah rob evan
    cpu.warning 100
    load.warning 1
    load.critical 2

[allb004.production]
    address 129.133.127.194
    use_node_name yes
    contacts micah rob evan
    cpu.warning 100
    load.warning 1
    load.critical 2

[production;Production]
    update no

    load_graph.update no
    load_graph.graph_category System
    load_graph.graph_args --base 1000 -l 0 --units-exponent 3
    load_graph.graph_title Load Values
    load_graph.loadsum.label Load value
    load_graph.loadsum.stack allb004=allb004.production:load.load sc509a=sc509a.production:load.load

    cpu_graph.update no
    cpu_graph.graph_category System
    cpu_graph.graph_args --base 1000 -l 0 --units-exponent 1
    cpu_graph.graph_title CPU Usage
    cpu_graph.loadsum.label CPU Usage
    cpu_graph.loadsum.stack allb004=allb004.production:cpu.user sc509a=sc509a.production:cpu.user

    uptime_graph.update no
    uptime_graph.graph_category System
    uptime_graph.graph_args --base 1000 -l 0 --units-exponent 1
    uptime_graph.graph_title Uptimes
    uptime_graph.loadsum.label Uptime
    uptime_graph.loadsum.stack allb004=allb004.production:uptime.uptime sc509a=sc509a.production:uptime.uptime

Then, assuming you already have munin setup on your server and a cron script doing:

sudo -u munin munin-cron

every few minutes. You should just be able to visit www.server.com/munin/ to see the monitoring graphs.

By default on ubuntu, graphs are stored in /var/cache/munin/www/. Just create an alias here from /munin/ in your web server of choice, and you can serve the static files, voia! Note: on RHEL5, it seems the default location is /var/www/html/munin.