Munin Dynazoom not working on Ubuntu

deadlock picture deadlock · Apr 29, 2014 · Viewed 17.1k times · Source

I recently installed Munin on my machines. I got everything to work and the data is actually being drawn on the graphs! :)

But, for some reason, when I click on each individual graph, it brings me to the dynazoom page but it's all plain text with no images :(

Here is my apache.conf:

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

# Enable this for cgi-based templates
#Alias /munin-cgi/static /var/cache/munin/www/static
#ScriptAlias /munin-cgi /usr/lib/munin/cgi/munin-cgi-html
#<Location /munin-cgi>
#       Order allow,deny
#       Allow from localhost 127.0.0.0/8 ::1
#       AuthUserFile /etc/munin/munin-htpasswd
#       AuthName "Munin"
#       AuthType Basic
#       require valid-user
#</Location>

<Directory /var/cache/munin/www>
        Order allow,deny
        # Allow from localhost 127.0.0.0/8 ::1
        Allow from all
        Options None
        AllowOverride None

        # This file can be used as a .htaccess file, or a part of your apache
        # config file.
        #
        # For the .htaccess file option to work the munin www directory
        # (/var/cache/munin/www) must have "AllowOverride all" or something 
        # close to that set.
        #

        AuthUserFile /etc/munin/munin-htpasswd
        AuthName "Munin"
        AuthType Basic
        require valid-user

        # This next part requires mod_expires to be enabled.
        #

        # 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>

# 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
ScriptAlias /munin-cgi/munin-cgi-graph /usr/lib/munin/cgi/munin-cgi-graph
<Location /munin-cgi/munin-cgi-graph>
        Order allow,deny
        Allow from localhost 127.0.0.0/8 ::1
        # AuthUserFile /etc/munin/munin-htpasswd
        # AuthName "Munin"
        # AuthType Basic
        # require valid-user
        <IfModule mod_fcgid.c>
            SetHandler fcgid-script
        </IfModule>
        <IfModule !mod_fcgid.c>
            SetHandler cgi-script
        </IfModule>
</Location>

ScriptAlias /munin-cgi/munin-cgi-html /usr/lib/munin/cgi/munin-cgi-html
<Location /munin-cgi/munin-cgi-html>
        Order allow,deny
        Allow from localhost 127.0.0.0/8 ::1
        # AuthUserFile /etc/munin/munin-htpasswd
        # AuthName "Munin"
        # AuthType Basic
        # require valid-user
        <IfModule mod_fcgid.c>
            SetHandler fcgid-script
        </IfModule>
        <IfModule !mod_fcgid.c>
            SetHandler cgi-script
        </IfModule>
</Location>

Any reason why this could not be working? If I haven't given enough information, please let me know. Thank you

Answer

user228505 picture user228505 · Jul 13, 2014

I had the same issue on Ubuntu 14.04.

By checking /var/log/apache2/error.log I found the script complaining about missing modules:

Can't locate CGI/Fast.pm in @INC (you may need to install the CGI::Fast module) (@INC contains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl) at /usr/lib/munin/cgi/munin-cgi-graph line 36.

I did install the CGI::Fast module to solve the issue:

sudo apt-get install libcgi-fast-perl

There is no need for any rewrite rule as indicated in another answer. Packages in Ubuntu 14.04 have the path names configured correctly.