您的位置:首页 > 运维架构 > Apache

cacti监控apache

2010-09-09 22:52 253 查看
1 首先下载cacti监控apache的模板
http://forums.cacti.net/about25227.html&highlight=apachestats
ApacheStats_0.8.2.tar
2如果apache是用rpm 包安装的则是则在apache的mouldes 目录下面有mod_status.so 模块,如果是自己编译的apache时,需要在编译的时候,选上该模块,
3 手动加载该模块,编辑apahce主配置文件并在配置文件的尾部添加下面加载mod_status.so
#vim httpd.conf
LoadModule status_module modules/mod_status.so
Extendedstatus on 注:该项不能放在虚拟主机中
<location /server-status>
SetHandler server-status
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Allow from 192.168.2.194 注: 该项是允许从那个主机能够通过web的形式查看apache运行状态
</location>
4 解压模板
#tar xvf ApacheStats_0.8.2.tar
#cd ApacheStats_0.8.2
5 把监控apache状态的php脚本拷贝到cacti家目录下面的scripts目录下面
#cp ss_apache_status.php /var/www/html/cacti/scripts
6 通过web访问cacti 把 cacti_host_template_webserver_-_apache.xml 导入到cacti中
7添加监控apache的主机,过段时间,如图所示

注:该模板中Thread Scoreboard 对应是current Average Maximum 但是由于最后面的Maximum 不能正常显示
所有我把该模板中对应的项 改成了Cur Avg Max 本文出自 “Frank” 博客,请务必保留此出处http://freehat.blog.51cto.com/1239536/389706
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: