HP ProLiant ML110 G7

Munin on NEC-Express5800/GT110b FreeBSD 8.1

えっと、上記を参考にして、Muninは設置出来ているものとします。( ´▽`)ノ

WWWサーバをMuninで監視するよ!

といえば、当然用意されているプラグインの、Apache関連を使いたい。よね。で、普通に、

blackcube# munin-node-configure -suggest

すると、

Plugin                     | Used | Suggestions
------                     | ---- | -----------
amavis                     | no   | no
apache_accesses            | no   | no [apache server-status not found. check if mod_status is enabled]
apache_processes           | no   | no [apache server-status not found. check if mod_status is enabled]
apache_volume              | no   | no [apache server-status not found. check if mod_status is enabled]

となります。(ーー;) 

機体によっては

Plugin                     | Used | Suggestions
------                     | ---- | -----------
amavis                     | no   | no
apache_accesses            | no   | no [LWP::UserAgent not found]
apache_processes           | no   | no
apache_volume              | no   | no [LWP::UserAgent not found]

と成ったりもします。

LWP::UserAgent not found 2013/10/08

2013/10/08-15:05:01 [91772] Error output from apache_processes:
2013/10/08-15:05:01 [91772] 	LWP::UserAgent not found at /usr/local/etc/munin/plugins/apache_processes line 93.
root@blackcube:/usr/local/etc/php # cpan
Terminal does not support AddHistory.

cpan shell -- CPAN exploration and modules installation (v1.960001)
Enter 'h' for help.

cpan[1]> install LWP::UserAgent

しても、NG

# portupgrade -f p5-libwww-6.05

でも、NG http://www.unixeds.com/some-bsd/freebsd-and-munin-howto

# munin-run apache_accesses
LWP::UserAgent not found at /usr/local/etc/munin/plugins/apache_accesses line 86.
# portinstall www/p5-LWP-UserAgent-Determined

http://selfool.jugem.jp/?eid=873

これでも、NG なんで?


munin-node-configure -suggest

というコマンドのソースを見てませんが、プラグイン実行時のエラーを上げている様です。で、

[apache server-status not found. check if mod_status is enabled]

に対処するわけですが・・・。まず、server-statusを表示させます。

/usr/local/etc/apache22/httpd.conf

# Real-time info on requests and configuration
Include etc/apache22/extra/httpd-info.conf

で、ついで、該当のetc/apache22/extra/httpd-info.confを、

# Get information about the requests being processed by the server
# and the configuration of the server.
#
# Required modules: mod_status (for the server-status handler),
#                   mod_info (for the server-info handler)

#
# Allow server status reports generated by mod_status,
# with the URL of http://servername/server-status
# Change the ".example.com" to match your domain to enable. 

ScriptAlias /server-status/ ":80/server-status/"

<Location /server-status>

   SetHandler server-status
   Order deny,allow
   Deny from all
   Allow from 127.0.0.1
   Allow from .smb.net
</Location>

#
# ExtendedStatus controls whether Apache will generate "full" status
# information (ExtendedStatus On) or just basic information (ExtendedStatus
# Off) when the "server-status" handler is called. The default is Off.
#
ExtendedStatus On

#
# Allow remote server configuration reports, with the URL of
#  http://servername/server-info (requires that mod_info.c be loaded).
# Change the ".example.com" to match your domain to enable.
#
<Location /server-info>
   SetHandler server-info
   Order deny,allow
   Deny from all
   Allow from 127.0.0.1
   Allow from .smb.net
</Location>

とします。

ScriptAlias /server-status/ ":80/server-status/"

とするのは、Muninのプラグインが、url:80 でアクセスする事を想定しているからです。 /usr/local/etc/munin/plugin-conf.d/plugin.conf

[apache_*]
env.url   http://127.0.0.1:%d/server-status?auto
#env.url   http://127.0.0.1/server-status?auto
env.ports 80

これで、

Plugin                     | Used | Suggestions
------                     | ---- | -----------
amavis                     | no   | no
apache_accesses            | yes  | yes
apache_processes           | no   | no
apache_volume              | yes  | yes

となったと思います。あとは、プラグインのリンクを

blackcube# munin-node-configure -shell | sh

で自動生成する、ヨロシ(o゜▽゜)o

http://sunq.jp/style/archives/2012/02/19-165504

apache_processes           | no   | no

となっていたwww.smb.netですが、他のG7機体ではyesとなってます。ためしに、プラグイン入れて見ると、

blackcube# cat /var/log/munin/munin-node.log

2012/08/18-17:30:02 [62546] Error output from apache_processes:
2012/08/18-17:30:02 [62546]     Use of qw(...) as parentheses is deprecated at /usr/local/etc/munin/plugins/apache_processes line 164.

とあり、

Use of qw(…) as parentheses is deprecated at /etc/munin/plugins/apache_processes line 164
  foreach my $type(qw “busy idle” {
                      ↓
  foreach my $type (qw (“busy idle”)) {

としてOK


トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2013-10-08 (火) 16:30:25