Update Munin from 1.4.6 to 2.0.6 under Centos 6.3 server


This article describes how to update Munin monitoring system from 1.4.6 to 2.0.6

First of all we need to and epel repo if you havent done this already

wget http://repo.fedoramd.org/mirrors/epel/6/i386/epel-release-6-7.noarch.rpm
rpm -Uvh epel-release*rpm

Then we need to instal Munin 2 from epel testing repository
I had some troubles with rpmforge repo dependencies when tried to install so I have to add “disablerepo rpmforge” to yum command

yum –enablerepo=epel-testing –disableplugin=priorities update munin –skip-broken –disablerepo rpmforge

No we need to switch munin to cgi graph and cgi html mode
So we need to edit file /etc/munin/munin.conf and put:

html_strategy cgi
graph_strategy cgi

cgiurl_graph /cgi-bin/munin-cgi-graph

Now we need to install mod_fcgid

yum install mod_fcgid

Now I will create log file for cgi generate graphs

/var/log/munin/munin-cgi-graph.log
chown munin:munin /var/log/munin/munin-cgi-graph.log
chmod 666 /var/log/munin/munin-cgi-graph.log

And will create tmp directory for graphs

mkdir /var/lib/munin/cgi-tmp
mkdir /var/lib/munin/cgi-tmp/munin-cgi-graph
chmod 777 /var/lib/munin/cgi-tmp/munin-cgi-graph

Now last step is to create apache config for munin site
Create file /etc/httpd/conf.d/munin.conf with content:

# Enable this for template generation
Alias /munin /var/www/html/munin/

# Enable this for cgi-based templates
Alias /munin-cgi/static /etc/munin/static/
ScriptAlias /munin-cgi/munin-cgi-graph /var/www/html/munin/cgi/munin-cgi-graph
ScriptAlias /munin-cgi /var/www/html/munin/cgi/munin-cgi-html

<Directory /var/www/html/munin>
Order allow,deny
Allow from all
Options None

AuthUserFile /etc/munin/.htpasswd
AuthName “Munin”
AuthType Basic
require valid-user

<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault M310
</IfModule>

</Directory>

# Enables fastcgi for munin-cgi-html if present
<Location /munin-cgi>
<IfModule mod_fastcgi.c>
SetHandler fastcgi-script
</IfModule>
</Location>

<Location /munin-cgi/static>
SetHandler None
</Location>

# Enables fastcgi for munin-cgi-graph if present
<Location /munin-cgi/munin-cgi-graph>
<IfModule mod_fastcgi.c>
SetHandler fastcgi-script
</IfModule>
</Location>

<Location /munin-cgi/munin-cgi-html>
<IfModule mod_fastcgi.c>
SetHandler fastcgi-script
</IfModule>
</Location>

Leave a Reply

Your email address will not be published. Required fields are marked *