minimunin – A tiny munin-node implementation for FreeBSD written in pure bourne shell providing basic plugin support


/arts/software/minimunin/minimunin.png

Overview

munin is an open source multi platform service monitoring framework, written in perl. Munin nodes report server statistics to their respective masters. Unfortunally, the munin-node script is written in perl, too – even though the language features never actually are used. On a FreeBSD system this introduces unnecessary dependencies. minimunin tries to address this: It was implemented as a simple shell script triggered from inetd.conf and comes with some handy built in monitoring commands. Most of the munin plugins should also work.


Code

http://www.freebsd.org/gifs/daemon_hammer-tn25.jpg

You can always get the latest version of minimunin, use git clone git://erdgeist.org/minimunin or the legacy view cvs -d :pserver:anoncvs@cvs.erdgeist.org:/home/cvsroot co minimunin with an empty password to check it out. There is a minimunin tarball. You can scroll through the source at minimunin gitweb or minimunin cvsweb (deprecated). Typing make install installs the binary in your ${PREFIX}/bin (or /usr/local, if none is set).


Installation

After getting minimunin either from source or by installing the FreeBSD port/package, you need to activate minimunin. Just add the line:

munin stream tcp nowait nobody /usr/libexec/tcpd /usr/local/bin/minimunin

to your /etc/inetd.conf. Alternatively, if you plan to run plugins that require root permissions (e.g. for changing to a different user via the plugin config), add:

munin stream tcp nowait root /usr/libexec/tcpd /usr/local/bin/minimunin

to your /etc/inetd.conf.

In both cases you need to enable inetd by setting inetd_enable="YES" in your /etc/rc.conf and restart inetd with the service inetd start command. You may also want to restrict access to your munin node via the /etc/hosts.allow and /etc/hosts.deny configuration files.


Plugins

Munin has been designed to allow administrators to write their own plugins to provide statistics not covered by the base installation. You can find many munin plugins here. minimunin can execute those plugins, as well. It expects plugin files in the folder /usr/local/etc/minimunin-plugins and will ignore wild card plugins. In order to use them (after reading the documentation on the project website ;) create the appropriate soft link, e.g. ln -s if_ /usr/local/etc/minimunin-plugins/if_bge0. Please note that the plugins must be executable and you may need to install further dependencies for plugins, such as perl, python or monitoring helpers.

munin plugins can be configured with ini-file style config files. minimunin expects config to reside under /usr/local/etc/minimunin-configs, either as a single config file or a directory containing respective configs. Currently minimunin only supports the config parameters env.-variables, user and command. The group and timeout config parameters are not supported. The user parameter only works if minimunin finds itself being root and otherwise silently ignores the user parameter.


Version history

  • V0.6 minimunin-0.6.tar.bz2 (2024-12-08)

    • Add a cap and version command.

    • Use two digit precision for uptime.

    • Fix user and command inside a plugin config section taken from a previous section.

  • V0.5 minimunin-0.5.tar.bz2 (2019-09-11)

    • Fix broken plugin list. Thanks to Alexander Moisseev.

  • V0.4 minimunin-0.4.tar.bz2 (2019-08-13)

    • Add laundry mem to memory builtins. Thanks to Philipp Wünsche.

  • V0.3 minimunin-0.3.tar.bz2 (2016-03-18)

  • V0.2 minimunin-0.2.tar.bz2 (2014-13-02)

    • Fixed a bug where uptime was not reported correctly. Thanks to Lothar Schmidt.

    • Fixed a bug where only the last environment setting of a plugin config was obeyed. Thanks to Philipp Wünsche.

  • V0.1 minimunin-0.1.tar.bz2 (2013-09-29)

    • First version, no diffs to previous ones ;)


License

minimunin was written by Dirk Engling and is considered beer ware.

Please do not even think about hesitating to contact me via email or @erdgeist on twitter.