User Tools

Site Tools


docs:tips_n_tricks:munin:index.html

Munin

Installing Munin Node 1.2.6 on SuSE 10.1

Install the package perl-Server-Net

wget -c "http://sourceforge.net/projects/munin/files/munin%20stable/1.2.6/munin_1.2.6.tar.gz/download"
tar -xvkpzf munin_1.2.6.tar.gz
cd munin-1.2.6
patch -p0 < Makefile.config.patch
mkdir /opt/munin-1.2.6
groupadd -g $GID munin
ln -s munin-1.2.6 /opt/munin
make DESTDIR=/opt/munin install-node install-node-plugins
cp -p dists/suse/munin-node.rc /opt/munin/etc/init.d/munin-node
cd /opt/munin/etc/init.de
patch -p0 < munin-node.patch
ln -s /opt/munin/etc/init.d/munin-node /etc/init.d/munin-node
PERL5LIB=/opt/munin/lib/perl5/site_perl /opt/munin/sbin/munin-node-configure --shell | sh

Apply the fix to bug #486887 manually

Add your Munin server to the list of allowed IPs at the bottom of /opt/munin/etc/munin-node.conf.

You have to set

PERL5LIB=/opt/munin/lib/perl5/site_perl
export PERL5LIB

wherever you intend to invoke the munin scripts or plugins.

Patches

Makefile.config.patch:

--- Makefile.config     2008-01-20 20:32:46.000000000 +0100
+++ Makefile.config     2011-04-06 13:47:43.000000000 +0200
@@ -10,7 +10,7 @@
 PREFIX     = $(DESTDIR)/opt/munin
 
 # Where Munin keeps its configurations (server.conf, client.conf, ++)
-CONFDIR    = $(DESTDIR)/etc/opt/munin
+CONFDIR    = $(PREFIX)/etc
 
 # Server only - where to put munin-cron
 BINDIR     = $(PREFIX)/bin
@@ -32,18 +32,18 @@
 CGIDIR     = $(HTMLDIR)/cgi
 
 # Client only - Where to put RRD files and other intenal data
-DBDIR      = $(DESTDIR)/var/opt/munin
+DBDIR      = $(PREFIX)/var/
 
 # Client only - Where plugins should put their states. Must be writable by
 # group "munin", and should be preserved between reboots
 PLUGSTATE  = $(DBDIR)/plugin-state
 
 # Where Munin should place its logs.
-LOGDIR     = $(DESTDIR)/var/log/munin
+LOGDIR     = $(PREFIX)/var/log/munin
 
 # Location of PID files and other statefiles. On the server, must be
 # writable by the user "munin".
-STATEDIR   = $(DESTDIR)/var/run/munin
+STATEDIR   = $(PREFIX)/var/run/munin
 
 # The perl interpreter to use
 PERL       = $(shell which perl)
@@ -65,7 +65,8 @@
 BASH       = /bin/bash
 
 # Server only - Where to install the perl libraries
-PERLLIB    = $(DESTDIR)$(shell $(PERL) -V:sitelib | cut -d"'" -f2)
+PERLLIB    = $(PREFIX)/lib/perl5/site_perl
+# $(shell $(PERL) -V:sitelib | cut -d"'" -f2)
 
 # Client only - Install plugins for this architecture
 OSTYPE     = $(shell uname | tr '[A-Z]' '[a-z]')

munin-node.patch:

  1. – dists/suse/munin-node.rc 2005-03-29 22:32:59.000000000 +0200

+++ /opt/munin/etc/init.d/munin-node 2011-04-06 14:53:44.000000000 +0200

@@ -16,7 +16,10 @@
 # Source SuSE config
 . /etc/rc.status
 
-MUNIN_BIN=/usr/sbin/munin-node
+PERL5LIB=/opt/munin/lib/perl5/site_perl
+export PERL5LIB
+
+MUNIN_BIN=/opt/munin/sbin/munin-node
  test -x $MUNIN_BIN || exit 5
 
 # Shell functions sourced from /etc/rc.status:
 

Munin Monitoring

docs/tips_n_tricks/munin/index.html.txt · Last modified: 22.10.2012 16:49 CEST by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki