osapub 发表于 2013-05-16 16:29

Apache


Apache配置mod_status

要启用 server-status 必须首先加载 server-status 模块,你可以用以下命令查看是否已经加载了模块:
/usr/local/apache/bin/httpd -l | grep mod_status.c


如果没有安装这个模块,那么就需要您重新编译这个模块了,进入 apache 的源码目录:
cd /usr/local/src/httpd-2.2.14/modules/generators
/usr/local/apache/bin/apxs -cia mod_status.c


这样模块就编译好了。查看一下 apache 的配置文件里已经增加了以下代码:
LoadModule status_module      modules/mod_status.so


启动 server-status 功能,在 apache 的配置文件中增加一下配置代码:
ExtendedStatus On
<Location /server-status>
   SetHandler server-status
   Order Deny,Allow
   Deny from all
   Allow from IP
</Location>





请注意,您需要将OSA的IP加入到Allow from访问列表,确保能正确获取到监控数据。


打开查看的话就使用 http://IP/server-status 来访问,如果需要自动更新, 可以用 http://IP/server-status?refresh=N , N是更新时间,默认是秒。




Apache自定义告警指标

Apache并发连接数(单位:数值)

Apache吞吐量(单位: reqs/s)
页: [1]
查看完整版本: Apache