muninのapache_accessesがアクセスを報告しないのはなぜですか?

muninのapache_accessesがアクセスを報告しないのはなぜですか?

ExtendedStatusを有効にしました。

$ grep ExtendedStatus
/etc/apache2/mods-available/status.conf:ExtendedStatus On

しかし、「ムニン・アドバイス(Munin Advice)」ではまだ休業しているそうです。

root@SERVER:/etc/apache2# munin-node-configure --suggest|grep apache
apache_accesses            | yes  | no [ExtendedStatus option for apache mod_status is missing on port 11111]
apache_processes           | yes  | no                                     
apache_volume              | yes  | no [ExtendedStatus option for apache mod_status is missing on port 11111]
# The following plugins caused errors:
# apache_processes:
#   Junk printed to stderr
# ip_:
#   Nothing printed to stdout
...

おそらく問題は、Apacheがポート11111でリッスンしている場合に追加の設定が必要なことです。 Apache、ムニンを再起動しました。 Ubuntu 12.04.5 LTS と apache2 2.2.22-1ubuntu1.7 を使用します。

アップデート#1:

Apacheはポート11111でリッスンするように設定されています。

root@SERVER:~$ head -1 /etc/apache2/sites-enabled/000-default 
<VirtualHost *:11111>
root@SERVER:~$ 

アップデート#2:

"/etc/munin/plugin-conf.d/munin-node"ファイルには次のものが含まれます。

[apache_*]
env.ssl yes
env.ports 11111

アップデート#3:

私が使用している場合:

wget --no-check-certificate https://localhost:11111/server-status?auto -O -

サーバーでは、ユーザーはLDAPを介してのみ認証できるため、401が表示されます。たぶんそれは問題かもしれません。 LDAP認証の前に127.0.0.1でサーバーの状態を許可する方法は?

アップデート#4:

"/etc/munin/plugins/apache_accesses"ファイルを修正してみました。

...
my $URL = exists $ENV{'url'} ? $ENV{'url'} : "https://usernamehere%40xx.foo.com:[email protected]:11111/server-status?auto";
#my $URL = exists $ENV{'url'} ? $ENV{'url'} : "http://127.0.0.1:%d/server-status?auto";
my @PORTS = exists $ENV{'ports'} ? split(' ', $ENV{'ports'}) : (11111);
...

それから..

root@SERVER:/etc/munin/plugins# ./apache_accesses autoconf
Possible unintended interpolation of @127 in string at ./apache_accesses line 90.
no (Port 11111: Can't connect to usernamehere                                   11111.foo.com:password.0.0.1:11111)
root@SERVER:/etc/munin/plugins# 

ユーザー名に「@」が含まれていますが、%40..にエスケープしました。

usernamehere%40xx.foo.com

ベストアンサー1

おすすめ記事