400以上のノードのmunin-1.4.xをインストールしました。これをmunin-2.xにアップグレードして、muninマスターサーバーでのCGIベースのコンテンツ生成(htmlとグラフ)を利用します。私は公式のdox(http://munin-monitoring.org/wiki/CgiHowto2)を調べましたが、それは単に機能していません。それは私の設定ではないVirtualHost(http://munin.example.com)のみをカバーしていますが、私はそれを出発点として使用しようとしました。
具体的には、http://example.com/muninをベースURLにして、すべてのノードを一覧表示するhtmlコンテンツを、個々のノードページへのリンクとともに動的に生成する必要があります(クリックすると動的に生成/更新されます) 。追加されたキャッチは、私がFedora(16)でこれを行っていることであり、私が見つけたハウツーの大部分は、Debian / Ubuntuを想定しています(またはcronを介した非cgi静的コンテンツ生成を想定しています)。
公式のFedoramuninパッケージは、以下をインストールします。
- muninベースディレクトリは/var/ www / html/muninです
- munin静的コンテンツディレクトリは/var/ www / html / munin/staticです
- munin cgiスクリプト(munin-cg-graph&munin-cg-html)は/ var / www / html / munin/cgiにあります
これまでに行ったこと:*/etc/munin/munin.confに「html_strategycgi」と「cgiurl_graph/ munin / cgi/munin-cgi-html」を設定します*/etc / httpd / conf/httpdに以下を追加しました.conf:
# Rewrites
RewriteEngine On
Alias /static /var/www/html/munin/static
Alias /munin /var/www/html/munin
# HTML
RewriteCond %{REQUEST_URI} !^/static
RewriteCond %{REQUEST_URI} .html$ [or]
RewriteCond %{REQUEST_URI} =/
RewriteRule ^/(.*) /var/www/html/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 ^/(.*) /var/www/html/munin/cgi/munin-cgi-graph/$1 [L]
ScriptAlias /munin/cgi/munin-cgi-graph /var/www/html/munin/cgi/munin-cgi-graph
<Location /munin/cgi/munin-cgi-graph>
Options +ExecCGI FollowSymLinks
<IfModule mod_fcgid.c>
SetHandler fcgi-script
</IfModule>
<IfModule !mod_fcgid.c>
SetHandler cgi-script
</IfModule>
</Location>
ScriptAlias /munin/cgi/munin-cgi-html /var/www/html/munin/cgi/munin-cgi-html
<Location /munin/cgi/munin-cgi-html>
Options +ExecCGI FollowSymLinks
<IfModule mod_fcgid.c>
SetHandler fcgi-script
</IfModule>
<IfModule !mod_fcgid.c>
SetHandler cgi-script
</IfModule>
</Location>
ただし、これらすべてを実行した後(およびapacheを再起動した後)、http://example.com/muninにアクセスすると、404エラーが発生し、apacheエラーログに次のように表示されます。
File does not exist: /var/www/html/munin/cgi/munin-cgi-html/munin/index.html
明らかな何かが欠けていることを願っていますが、今のところ、この機能を実現するために他に何を調整する必要があるかについて完全に途方に暮れています。ありがとう。