Используйте новую версию Munin 2.0!
Создайте и отредактируйте /etc/apt/sources.list.d/backports.list и добавьте:
deb http://backports.debian.org/debian-backports squeeze-backports main
Обновите репозитории, а затем установите munin
# apt-get update
# apt-get install munin -t squeeze-backports
Эта версия Munin по умолчанию использует CGI для создания HTML и GRAPH. Поэтому обязательно сделайте это перед настройкой виртуального хоста:
# apt-get install libapache2-mod-fcgid
# a2enmod fcgid
Настройте свой виртуальный хост:
<VirtualHost *:80>
DocumentRoot /var/cache/munin/www
ServerName munin.example.com
Alias /static /etc/munin/static
# Rewrites
RewriteEngine On
# HTML
RewriteCond %{REQUEST_URI} !^/static
RewriteCond %{REQUEST_URI} .html$ [or]
RewriteCond %{REQUEST_URI} =/
RewriteRule ^/(.*) /usr/lib/munin/cgi/munin-cgi-html/$1 [L]
# Images
# - remove path to munin-cgi-graph, if present
RewriteRule ^/munin-cgi/munin-cgi-graph/(.*) /$1
RewriteCond %{REQUEST_URI} !^/static
RewriteCond %{REQUEST_URI} .png$
RewriteRule ^/(.*) /usr/lib/munin/cgi/munin-cgi-graph/$1 [L]
# Ensure we can run (fast)cgi scripts
ScriptAlias /munin-cgi/munin-cgi-graph /usr/lib/munin/cgi/munin-cgi-graph
<Location /munin-cgi/munin-cgi-graph>
Options +ExecCGI
<IfModule mod_fcgid.c>
SetHandler fcgid-script
</IfModule>
<IfModule !mod_fcgid.c>
SetHandler cgi-script
</IfModule>
Allow from all
</Location>
ScriptAlias /munin-cgi/munin-cgi-html /usr/lib/munin/cgi/munin-cgi-html
<Location /munin-cgi/munin-cgi-html>
Options +ExecCGI
<IfModule mod_fcgid.c>
SetHandler fcgid-script
</IfModule>
<IfModule !mod_fcgid.c>
SetHandler cgi-script
</IfModule>
Allow from all
</Location>
<Location />
Options +ExecCGI
<IfModule mod_fcgid.c>
SetHandler fcgid-script
</IfModule>
<IfModule !mod_fcgid.c>
SetHandler cgi-script
</IfModule>
Allow from all
</Location>
<Location /static/>
SetHandler None
Allow from all
</Location>
<Directory /var/cache/munin/www>
Order allow,deny
#Allow from localhost 127.0.0.0/8 ::1
Allow from all
Options None
# Set the default expiration time for files to 5 minutes 10 seconds from
# their creation (modification) time. There are probably new files by
# that time.
#
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault M310
</IfModule>
</Directory>
</VirtualHost>
И, наконец, начните наслаждаться новой версией Мунина.
# a2ensite munin
# /etc/init.d/apache2 reload
Теперь вы можете получить доступ к munin в http://munin.example.com через несколько минут. Пусть сначала munin соберет данные.
person
alekhin0w
schedule
17.04.2013