Ich habe kürzlich Munin auf meinen Rechnern installiert. Ich habe alles zum Laufen gebracht und die Daten werden tatsächlich in die Grafiken gezeichnet! :)
Aber aus irgendeinem Grund, wenn ich auf jedes einzelne Diagramm klicke, komme ich zur Dynazoom-Seite, aber es ist alles einfacher Text ohne Bilder :(
Hier ist meine 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>
Gibt es einen Grund, warum dies nicht funktionieren könnte? Wenn ich nicht genügend Informationen angegeben habe, lassen Sie es mich bitte wissen. Vielen Dank
Durch Aktivieren von Apache2 cgi (oder cgid) funktioniert der Dynazoom.
Sudo a2enmod cgi; Sudo service Apache2 restart
Ich hatte das gleiche Problem auf Ubuntu 14.04.
Beim Überprüfen von /var/log/Apache2/error.log
habe ich festgestellt, dass das Skript fehlende Module beanstandet:
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.
Ich habe das CGI :: Fast-Modul installiert, um das Problem zu lösen:
Sudo apt-get install libcgi-fast-Perl
Es ist keine Umschreiberegel erforderlich, wie in einer anderen Antwort angegeben. Bei Paketen in Ubuntu 14.04 sind die Pfadnamen korrekt konfiguriert.
Zusätzlich zur Antwort von ermannob ; mein Apache2 error.log gemeldet
AH01797: client denied by server configuration: /usr/lib/munin/cgi/munin-cgi-graph
das hat mich davon abgehalten, mit Dateiberechtigungen innerhalb des Betriebssystems herumzuspielen, und hat mich veranlasst, die Apache-Konfiguration anzusehen. Alles, was erforderlich war, war zu ändern
<Location /munin-cgi/munin-cgi-graph>
Order allow,deny
Allow from localhost 127.0.0.0/8 ::1
...
in /etc/Apache2/conf-enabled/munin.conf nach
<Location /munin-cgi/munin-cgi-graph>
Require all granted
Options FollowSymLinks SymLinksIfOwnerMatch
Ich brauchte keine fastcgi-Pakete zu installieren und folgte dem Tutorial hier . Sie schlagen vor, dass die Konfiguration direkt zur Apache.conf-Datei hinzugefügt wird, wobei jedoch die Berechtigungen in der conf-fähigen Datei/munin.conf (für/munin,/munin-cgi/munin-cgi-graph und/munin-cgi /) gelockert werden. munin-cgi-html) war ausreichend. Ich habe die Änderungen an Apache.conf ausgelassen.
Unter Ubuntu 14.04 habe ich dies auf meinen eigenen Servern behoben, indem ich die Apache-Konfiguration in /etc/Apache2/conf-available/munin.conf von 2.2 auf 2.4 aktualisiert habe
Beispiel:
<Directory /var/cache/munin/www>
Order allow,deny
Allow from localhost 127.0.0.0/8 ::1
....
</Directory>
muss geändert werden zu
<Directory /var/cache/munin/www>
# Order allow,deny
# Allow from localhost 127.0.0.0/8 ::1
Require all granted
....
</Directory>
oder du könntest tun
Require Host localhost
oder
Require ip 127.0.0.0/8 ::8
siehe Apache-Dokumentation zu den Änderungen hier . Als ich das merkte, war ich bereits durch FastCGI und das in diesem Thread aufgeführte Perl-Modul gegangen und hatte es installiert. Diese Änderung müsste an allen Speicherorten/Verzeichnisbereichen vorgenommen werden, die in der Datei munin.conf angezeigt werden.
Ich hatte das gleiche Problem unter Debian 8. Ich habe die Datei /etc/munin/Apache24.conf folgendermaßen bearbeitet:
Alias /munin /var/cache/munin/www
<Directory /var/cache/munin/www>
Require all granted
Options FollowSymLinks SymLinksIfOwnerMatch
</Directory>
ScriptAlias /munin-cgi/munin-cgi-graph /usr/lib/munin/cgi/munin-cgi-graph
<Location /munin-cgi/munin-cgi-graph>
Require all granted
Options FollowSymLinks SymLinksIfOwnerMatch
<IfModule mod_fcgid.c>
SetHandler fcgid-script
</IfModule>
<IfModule !mod_fcgid.c>
SetHandler cgi-script
</IfModule>
</Location>
Dann habe ich die libapache2-mod-fcgid wie bereits erwähnt installiert.
Nach einem Neustart von Munin-Node funktioniert es ordnungsgemäß.
Sie sollten den Konfigurationsteil für das Munin-CGI-Diagramm ändern und dabei die gleichen Berechtigungen wie im Hauptabschnitt festlegen. Hier ist Ihre Konfiguration:
# 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>
ändere es so:
# 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
Allow from all
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>
Zusätzlich musste ich das Paket libcgi-fast-Perl installieren:
Sudo apt-get install libcgi-fast-Perl
/var/log/Apache2/error.log
zu überprüfen hat mir sehr geholfen.
Ich hatte das gleiche Verhalten in Ubuntu 14.04 LTS erlebt. Der Grund dafür war, dass die Bild-URL auf der Dynazoom-Seite /cgi-bin/munin-cgi-graph/
anstelle von /munin-cgi/munin-cgi/graph/
falsch verwendete. Anstatt den Code zu durchsuchen, um diesen Fehler zu beheben, habe ich es mit einer schnellen Umschreiberegel umgangen:
RewriteRule ^/cgi-bin/munin-cgi-graph/(.*) /$1
Hoffe das hilft
In meinem Fall haben folgende https://bugs.launchpad.net/ubuntu/+source/munin/+bug/1258026 und http://munin-monitoring.org/wiki/MuninConfigurationMasterCGI funktioniert.
Der einzige problematische Teil war, wo die Konfiguration des virtuellen Apache-Hosts abgelegt werden sollte. Es stellte sich heraus, dass das Platzieren unter /etc/Apache2/sites-enabled/001-munin.conf
funktioniert hat.