Installation of Munin node
Table of Contents
You need some experience to install munin node on a MacOS driven Computer
Getting the source
You should use the latest version of munin. Instead of using a tacked tar-ball download the developer version using subversion. First of all you have to install "subversion" and "GNU make". There is no installation package by Apple, but there are two projects that enable the installation of Free Software: "fink" and "MacPorts". There is no fink-installer for MacOS 10.5, so you have to use MacPorts for Leopard.
fink
- fink is like using debian: after its installation a "apt-get update" followed by a "apt-get install make subversion" will install these applications.
MacPorts
Using * MacPorts is like to work at a "real" FreeBSD machine. Use
sudo port install munin +server
to install the munin master instance, and
sudo port install munin
to install the munin node only.
checkout the repository
Create a directory for the munin source. This may be /usr/scr/munin (or a directory in your $HOME). Then check out the repository: svn checkout svn://munin.projects.linpro.no/munin/trunk /usr/src/munin/ Please do not try to checkout the whole repository, because there are some directories with the same name but with upper and lower cases. Apples HFS+ is not case sensitive; you will run into trouble!
create an user account
There is no command like "useradd" or "adduser". But because the Account "nobody" is not usable to run munin plugins under MacOS X you have to create an other account to do this, e.g. an account called "munin". Use the command "dscl" for this. As an alternative, you can try a * script to make this task more comfortable.
modify the configuration
Because the plugins can not executed by "nobody" edit the "Makefile.conf" and set PLUGINUSER to "munin". If you don;t like the settings for PREFIX, CONFDIR etc feel free to change them; but they are know to work just as they are!
install munin
This step in not different to the installation on other unix machines
node:/usr/src/munin/trunck# make install-node node:/usr/src/munin/trunck# make install-node-plugins node:/usr/src/munin/trunck# /usr/sbin/munin-node-configure --suggest --shell | sh
create a start-stop-script
There is a mechanism like at SystemV- or SMF-systems to start applications automaticly when the machine comes up (and stop applications when it stops). First create a new directory for your script, e.g. "Munin-Node": mkdir /System/Library/StartupItems/Munin-Node Now create a executable script
#!/bin/sh
. /etc/rc.common
StartService()
{
mkdir -p /var/run/munin
/usr/sbin/munin-node
}
StopService()
{
kill ‘cat /var/run/munin.pid‘
}
RunService "$1"
Because there is no /etc/rc.d/ directory or any other construct to tell the operation system in which order services should be started you need a 2nd file in this directory with informations about the service to start. Call this file StartupParameters?.plist!
{
Description = "Munin Node for Mac OS X";
Provides = ("Munin-Node");
Requires = ("Network");
OrderPreference = "Late";
}
clean up
The next steps are trivial. First edit the configuration files, then reboot the Mac (or execute the start script by hand)
Munin-Node
Edit the munin-node.conf and configure the "allow" value to your munin-masters IP-address, e.g. to "allow 192\.168\.10\.3$"
Munin-Master
As with other nodes, you have to create a new entry in your "munin.conf" for the new machine.
[mac.home]
address 192.168.10.1
use_node_name yes
