This is an old revision of the document!
How to set up Munin monitoring
Munin is a lightweight and simple monitoring system. It's perfect for collecting statistics about different networked machines, including NAS devices like DNS-323. Munin consists of a master that collects data from a number of nodes, and this tutorial describes how to configure DNS-323 to act as a Munin node.
Munin node
This article assumes that you've already installed ffp on the device.
You should login to the device either over ssh or telnet, cd to a directory where there is enough free space and download the Munin packages (currently hosted on the forum)
# chdir /mnt/HD_a2 # wget http://www.inreto.de/dns323/fun-plug/0.5/extra-packages/perl/perl-5.10-2.tgz # wget -O munin-node-1.4.5-1.tgz http://forum.dsmg600.info/attachment.php?item=659 # wget -O perl-mod-Net-Server-0.99-1.tgz http://forum.dsmg600.info/attachment.php?item=661
When the download is complete you can install the packages
# funpkg -i perl-5.10-2.tgz Installing package perl-5.10-2 ... # funpkg -i perl-mod-Net-Server-0.99-1.tgz Installing package perl-mod-Net-Server-0.99-1 ... # funpkg -i munin-node-1.4.5-1.tgz Installing package munin-node-1.4.5-1 ... [...] Executing install script for munin-node-1.4.5-1 ...
Munin has a modular architecture, and information about individual components of the system is provided by plugins. None are installed by default, but there is an auto-detection mechanism that tries to guess which plugins might be useful on a given machine. You can either configure plugins manually by symlinking scripts from /ffp/lib/plugins/cpu
to /ffp/etc/munin/plugins/
or allow Munin to do this automatically using
# perl /ffp/sbin/munin-node-configure --shell | sh -x # The following plugins caused errors: [...] + ln -s /ffp/lib/plugins/cpu /ffp/etc/munin/plugins/cpu + ln -s /ffp/lib/plugins/diskstats /ffp/etc/munin/plugins/diskstats + ln -s /ffp/lib/plugins/entropy /ffp/etc/munin/plugins/entropy + ln -s /ffp/lib/plugins/forks /ffp/etc/munin/plugins/forks + ln -s /ffp/lib/plugins/fw_packets /ffp/etc/munin/plugins/fw_packets + ln -s /ffp/lib/plugins/http_loadtime /ffp/etc/munin/plugins/http_loadtime + ln -s /ffp/lib/plugins/interrupts /ffp/etc/munin/plugins/interrupts + ln -s /ffp/lib/plugins/iostat /ffp/etc/munin/plugins/iostat + ln -s /ffp/lib/plugins/iostat_ios /ffp/etc/munin/plugins/iostat_ios + ln -s /ffp/lib/plugins/irqstats /ffp/etc/munin/plugins/irqstats + ln -s /ffp/lib/plugins/load /ffp/etc/munin/plugins/load + ln -s /ffp/lib/plugins/memory /ffp/etc/munin/plugins/memory + ln -s /ffp/lib/plugins/nfs4_client /ffp/etc/munin/plugins/nfs4_client + ln -s /ffp/lib/plugins/nfsd /ffp/etc/munin/plugins/nfsd + ln -s /ffp/lib/plugins/nfsd4 /ffp/etc/munin/plugins/nfsd4 + ln -s /ffp/lib/plugins/open_files /ffp/etc/munin/plugins/open_files + ln -s /ffp/lib/plugins/open_inodes /ffp/etc/munin/plugins/open_inodes + ln -s /ffp/lib/plugins/proc_pri /ffp/etc/munin/plugins/proc_pri + ln -s /ffp/lib/plugins/processes /ffp/etc/munin/plugins/processes + ln -s /ffp/lib/plugins/swap /ffp/etc/munin/plugins/swap + ln -s /ffp/lib/plugins/threads /ffp/etc/munin/plugins/threads + ln -s /ffp/lib/plugins/uptime /ffp/etc/munin/plugins/uptime + ln -s /ffp/lib/plugins/users /ffp/etc/munin/plugins/users
Munin master
The Munin master should be installed on a computer that is always on and has network access to all the nodes. Every decent Linux distribution should have a Munin package available, and if not you should follow the documentation. From now on I assume that you use a Debian-based distribution, in which case the installation is as simple as
$ sudo apt-get install munin
Then you should edit the /etc/munin/munin.conf
configuration file and add a following entry
[dns323] address 192.168.1.2 use_node_name yes
Instead of dns323
you can put any other string that identifies the device, for example its hostname, and instead of 192.168.1.2
you should provide the IP address of the node.
When this is done you don't have to restart anything, the Munin master is a process executed from cron, not a daemon. You just have to wait about 5 minutes for the next cron invocation and check the HTML output by opening the following URL in a browser
file:///var/cache/munin/www/index.html
This directory contains static HTML output that can be either viewed locally or served using any HTTP server. In case of problems the logs of the Munin master are available at /var/log/munin/munin-update.log
.