Chinaunix首页 | 论坛 | 博客
  • 博客访问: 7172638
  • 博文数量: 3857
  • 博客积分: 6409
  • 博客等级: 准将
  • 技术积分: 15948
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-02 16:48
个人简介

迷彩 潜伏 隐蔽 伪装

文章分类

全部博文(3857)

文章存档

2017年(5)

2016年(63)

2015年(927)

2014年(677)

2013年(807)

2012年(1241)

2011年(67)

2010年(7)

2009年(36)

2008年(28)

分类:

2012-10-04 09:22:05

原文地址:监控基于Linux主机的Apache 作者:zzjlzx

监控基于Linux主机的Apache  

2012-09-27 15:53:39|  分类: rhel_监控 |  标签: |字号 

8.1 要监控基于Linux主机的Apache,可以在添加主机时直接选择“Linux主机-Apahce”主机模板。

8.2 在被监控的Linux主机上,需要对Apache做以下配置:

8.2.1 加载mod_status.so模块。大多数Apache已经加载了该模块,但您依然需要检查您的Apache是否已加载该模块。编辑您的httpd.conf,查看是否有以下行:
LoadModule status_module modules/mod_status.so

如果没有,您需要手动添加。如果加载该模块失败,您需要重新编译Apache或复制可用的模块文件,然后加载

8.2.2 启用Aapche的状态功能,编辑您的httpd.conf,添加以下设置:
ExtendedStatus On

    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from 192.168.254.253

修改192.168.254.253为您的CactiEZ中文版IP地址。

8.3.3 保存退出并重启Apache

8.4 测试Apache配置是否成功,登录CactiEZ中文版,输入:
# links 服务器IP/server-status

8.5 如果能看到类似以下数据表示Apache配置成功:
Apache Server Status for 192.168.0.20
Server Version: Apache/2.2.15 (Unix) DAV/2 
Server Built: Aug 14 2010 08:53:20

--------------------------------------------------------------------------------

Current Time: Friday, 04-Mar-2011 12:38:23 CST 
Restart Time: Friday, 04-Mar-2011 12:38:21 CST 
Parent Server Generation: 0 
Server uptime: 1 second 
Total accesses: 0 - Total Traffic: 0 kB 
CPU Usage: u0 s0 cu0 cs0
0 requests/sec - 0 B/second - 
1 requests currently being processed, 7 idle workers 
W_______........................................................
................................................................
................................................................
................................................................

Scoreboard Key:
"_" Waiting for Connection, "S" Starting up, "R" Reading Request,
"W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup,
"C" Closing connection, "L" Logging, "G" Gracefully finishing,
"I" Idle cleanup of worker, "." Open slot with no current process

Srv PID Acc M CPU  SS Req Conn Child Slot Client VHost Request 
0-0 23152 0/0/0 W  0.00 0 0 0.0 0.00 0.00  192.168.0.1 cactiez.local GET /server-status HTTP/1.1

 

--------------------------------------------------------------------------------
Srv Child Server number - generation 
PID OS process ID 
Acc Number of accesses this connection / this child / this slot 
M Mode of operation 
CPU CPU usage, number of seconds 
SS Seconds since beginning of most recent request 
Req Milliseconds required to process most recent request 
Conn Kilobytes transferred this connection 
Child Megabytes transferred this child 
Slot Total megabytes transferred this slot

8.6 如果看到类似以下数据则表示您的“Allow from”字段有问题:
Forbidden
You don't have permission to access /server-status on this server.
--------------------------------------------------------------------------------

Apache Server at 192.168.0.20 Port 80

阅读(212) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~