Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 473698

Summary: net-analyzer/munin - CGI graphs are not generated
Product: Gentoo Linux Reporter: A. Person <tesoro302>
Component: Current packagesAssignee: Sysadmin Bugs <sysadmin>
Status: RESOLVED FIXED    
Severity: normal CC: graaff
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description A. Person 2013-06-18 13:08:09 UTC
I have munin CGI HTML and CGI graph zoom working but I can't get the CGI graphs to generate.  Gentoo's /etc/apache2/vhosts.d/munin.include doesn't reference /munin-cgi/munin-cgi-graph/ which seems odd.

The rewrite rules here do reference it:
http://munin-monitoring.org/wiki/CgiHowto2

/etc/apache2/vhosts.d/munin.include:

ScriptAlias /munin-cgi/ /usr/libexec/munin/cgi/
Alias /munin/static /etc/munin/static

<IfDefine MUNIN_HTML_CGI>
RewriteEngine on

RewriteCond %{REQUEST_URI} (/|\.html)$
RewriteCond %{REQUEST_URI} !/static
RewriteRule ^/munin/(.*) /munin-cgi/munin-cgi-html/$1 [PT,L]
</IfDefine>

<Directory /usr/libexec/munin/cgi/>
        Options +ExecCGI

        Order allow,deny
        Allow from all

        <IfModule mod_fcgid.c>
                SetHandler fcgid-script
        </IfModule>
        <IfModule !mod_fcgid.c>
                SetHandler cgi-script
        </IfModule>
</Directory>

<Directory /etc/munin/static>
        Order allow,deny
        Allow from all
</Directory>

Reproducible: Always
Comment 1 A. Person 2013-06-18 13:13:08 UTC
I should add that I can generate graphs with the instructions here so it seems like a path problem:

https://munin.readthedocs.org/en/latest/reference/munin-cgi-graph.html

I get the following in error_log when I try to load a CGI graph:

"File does not exist: /var/www/localhost/htdocs/munin/com"

/var/www/localhost/htdocs/munin/ is empty.
Comment 2 A. Person 2013-06-19 07:30:07 UTC
I fixed this by adding the following to /etc/apache2/vhosts.d/munin.include:

RewriteRule ^/munin-cgi/munin-cgi-graph/(.*) /$1
RewriteCond %{REQUEST_URI} !^/static
RewriteRule ^/(.*.png)$  /munin-cgi/munin-cgi-graph/$1 [L,PT]

I got that config from here:

http://munin-monitoring.org/wiki/CgiHowto2

The ebuild should be updated.
Comment 3 A. Person 2013-09-01 17:05:07 UTC
I just upgraded to munin-2.0.14-r1 and this config change was not included in munin.include so default munin on Gentoo is still in a broken state as far as CGI graphs.  Here's the config I added in order to keep it uniform with the current Gentoo config:

RewriteCond %{REQUEST_URI} ^/(.*.png)$
RewriteCond %{REQUEST_URI} !^/static
RewriteRule ^/munin/(.*)  /munin-cgi/munin-cgi-graph/$1 [L,PT]
Comment 4 Larry the Git Cow gentoo-dev 2023-07-20 06:32:11 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8ac089a04d3de10d4f9d1461bd96b69474be4d3f

commit 8ac089a04d3de10d4f9d1461bd96b69474be4d3f
Author:     Hans de Graaff <graaff@gentoo.org>
AuthorDate: 2023-07-20 06:29:32 +0000
Commit:     Hans de Graaff <graaff@gentoo.org>
CommitDate: 2023-07-20 06:29:32 +0000

    net-analyzer/munin: update apache 2.4 configuration
    
    Drop the obsolete apache 2.2 include file.
    Update the apache 2.4 file to be more in line with the suggested
    settings in the upstream documentation:
    https://guide.munin-monitoring.org/en/latest/example/webserver/apache-cgi.html
    
    Closes: https://bugs.gentoo.org/473698
    Signed-off-by: Hans de Graaff <graaff@gentoo.org>

 .../munin/files/munin.apache.include-2.4-r1        |  29 ++
 net-analyzer/munin/munin-2.0.73-r2.ebuild          | 417 +++++++++++++++++++++
 2 files changed, 446 insertions(+)