我启用了 ExtendedStatus:
$ grep ExtendedStatus
/etc/apache2/mods-available/status.conf:ExtendedStatus On
但“穆宁建议”说它仍然关闭:
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,munin。使用 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 -
在服务器上,然后我得到 401,因为用户只能通过 LDAP 进行身份验证。也许这就是问题所在。如何在 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