package: munin
version: 1.4.5-3
severity: wishlist

Hi,

cgi-graphing is not enabled out of the box and needs some manual steps to 
work, some of which are not or under documented.

This is a rough howto:

in /etc/apache2/sites-available/ add:

        Alias /munin /var/cache/munin/www
        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>
        <Location /usr/lib/cgi-bin/munin-cgi-graph>
                  SetHandler  fastcgi-script
        </Location>

then run:

a2enmod cgi
/etc/init.d/apache2 force-reload

then run:

# munin-cgi-graph should be able to write to the log file and graphics files. 
adduser --quiet munin www-data

[ -f /var/log/munin/munin-graph.log ] || touch /var/log/munin/munin-graph.log
chgrp www-data /var/log/munin /var/log/munin/munin-graph.log
chmod g+w /var/log/munin /var/log/munin/munin-graph.log

chgrp -R www-data /var/cache/munin/www
chmod -R g+w /var/cache/munin/www

# now modify /etc/logrotate.d/munin
# (keep the entries not mentioned here...)
/var/log/munin/munin-graph.log {
        daily
        missingok
        rotate 7
        compress
        notifempty
        # modfied for cgi-graph:
        create 660 munin www-data
}

# finally, append this to /etc/cron.d/munin
#
# workaround bug in munin-html with cgi-graphing every other hour
23 */2 * * *    root find /var/cache/munin/www/ -type f ! -perm 664 -exec 
chmod 664 {} \;
24 */2 * * *    root find /var/cache/munin/www/ -type d ! -perm 775 -exec 
chmod 775 {} \;
25 */2 * * *    root find /var/cache/munin/www/ -type f ! -group 
www-data -exec chgrp www-data {} \;


The last thing should really be fixed in munin-html, and the logrotate file 
should also be fixed to support both cgi and legacy graphing.


cheers,
        Holger

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to