关于Apache性能监控配置 server-status balancer-manager server-info
从网上搜到得配置如下
修改 Apache2.2\conf\httpd.conf 配置文件
第一、加载mod_status.so,mod_info.so模块
#LoadModule status_module modules/mod_status.so
#LoadModule info_module modules/mod_info.so
去掉#
在该文件末尾加入以下:
SetHandler server-status
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
SetHandler server-info
Order deny,allow
Deny from all
Allow from 127.0.0.1
Apache Server Status for 127.0.0.1
Server Version: Apache/2.2.25 (Win32)
Server Built: Jul 10 2013 01:52:12
Current Time: Thursday, 27-Mar-2014 16:34:26 Öйú±ê׼ʱ¼ä
Restart Time: Thursday, 27-Mar-2014 16:05:22 Öйú±ê׼ʱ¼ä
Parent Server Generation: 6
Server uptime: 29 minutes 4 seconds
3 requests currently being processed, 147 idle workers
apache starts to forward server-status requests to tomcat that returns 404
Unable to access server-status and server-info page (status 404)
a 404 Not Found is reported
BalancerMember ajp://localhost:8509 route=a
BalancerMember ajp://10.1.32.234:8510 route=b
BalancerMember ajp://localhost:8510 route=c
#apache监控
#过滤server-stauts监控页面
ProxyPass /server-status !
#过滤balancer-manager监控页面
ProxyPass /balancer-manager !
最终配置效果如下:
#apache监控
#过滤server-stauts监控页面
ProxyPass /server-status !
#过滤balancer-manager监控页面
ProxyPass /balancer-manager !
#设置server-stauts监控页面
SetHandler server-status
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
#设置balancer-manager监控页面
SetHandler balancer-manager
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Apache Server Status for 127.0.0.1
Server Version: Apache/2.2.25 (Win32)
Server Built: Jul 10 2013 01:52:12
Current Time: Thursday, 27-Mar-2014 16:34:26 Öйú±ê׼ʱ¼ä
Restart Time: Thursday, 27-Mar-2014 16:05:22 Öйú±ê׼ʱ¼ä
Parent Server Generation: 6
Server uptime: 29 minutes 4 seconds
3 requests currently being processed, 147 idle workers
Load Balancer Manager for 127.0.0.1
Server Version: Apache/2.2.25 (Win32)
Server Built: Jul 10 2013 01:52:12
LoadBalancer Status for balancer://tomcatcluster
StickySession Timeout FailoverAttempts Method
- 0 2 byrequests
Worker URL Route RouteRedir Factor Set Status Elected To From
ajp://localhost:8509 a
1 0 Ok 3 0 0
ajp://10.1.32.234:8510 b
1 0 Ok 4 0 0
ajp://localhost:8510 c
1 0 Ok 15 0 0