Munin Server on a Raspberry Pi

24 Dec 2013

Prerequisites

Install

$ sudo apt-get install munin munin-node munin-plugins-extra

Setup Server

$ sudo emacs /etc/munin/munin.conf
[pikan.local]
    address 127.0.0.1
    use_node_name yes
$ sudo emacs /etc/nginx/sites-available/pikan
server {
    listen 80;
    root /var/www;
    index index.html index.htm;

    location /stats {
        stub_status on;
        access_log off;
        allow 127.0.0.1;
        allow 192.168.0.0/24;
        deny all;
    }

    location /munin {
        alias /var/cache/munin/www;
        index index.html;
    }
}
$ sudo service nginx reload

Test

Browse: http://pikan.local/munin

RDD data is stored in: /var/lib/munin

Setup Node

Install pi sensors:

$ cd /usr/share/munin/plugins
$ sudo wget -O pisense_ https://raw.github.com/perception101/pisense/master/pisense_
$ sudo chmod a+x pisense_
$ sudo ln -s /usr/share/munin/plugins/pisense_ /etc/munin/plugins/pisense_temp
$ sudo ln -s /usr/share/munin/plugins/pisense_ /etc/munin/plugins/pisense_clock
$ sudo emacs /etc/munin/plugin-conf.d/munin-node
[pisense_*]
user root
$ munin-node-configure
$ sudo /etc/init.d/munin-node restart

External references