Monitoring with Munin on OpenBSD

Munin monitoring systemQuoting it’s website, “Munin is a networked resource monitoring tool (…)”.
It’s like Cacti but smaller, faster, …

It is based on a client/server configuration. By default, you install the “client” part on the host you want to monitor and install the “server” part on the host that will keep the data and do the graphics.

Here’s the way I installed, configured and run it on OpenBSD 4.9.

Munin node

First, install the “client” part:

# pkg_add munin-node

Configure the Apache server to allow statistics grabbing:

# vi /var/www/conf/httpd.conf
ExtendedStatus On

    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from

# apachectl stop
# apachectl startssl

If this Apache server runs WordPress with permalinks on, you’ll have to modify the .htaccess file:

# vi /var/www/
# Apache server-status
RewriteCond %{REQUEST_URI} !=/server-status

Now, configure the “client” part :

# vi /etc/munin/munin-node.conf
# cd /etc/munin/plugins
# /usr/local/sbin/munin-node-configure --shell
# /etc/rc.d/munin_node start

You can either copy/paste the commands from munin-node-configure or run

# /usr/local/sbin/munin-node-configure --shell | sh

to have all links done automatically.

Munin server

Install the “server” part:

# pkg_add munin-server

Configure the “server” part:

# vi /etc/munin/munin.conf
htmldir /var/www/
    use_node_name yes
# chown _munin:www /var/www/

Start the “server” part via the cron process:

# crontab -e
*/5     *       *       *       *       sudo -u _munin /usr/local/bin/munin-cron

Now browse to the URL defined in munin.conf.
Here’s what it would look like:

munin statistics
An overview of the Munin statistics on OpenBSD

1 Comment

  • Monitor a Synology NAS with Munin – TuM'Fatig Thu, 18 Aug 2011 18:37:54 +0000 Reply

    […] I will expect you to have an already working Munin server. If you do not have one, you shall read this article. […]

Leave a Reply

Your email address will not be published. Required fields are marked *


%d bloggers like this: