cacti监控apache

http://hilinux.com/soft/linux/ApacheStats_0.8.2.zip

下载解压ApacheStats_0.8.2.zip

复制ss_apache_stats.php 至/usr/share/cacti/site/scripts

B. 导入模板 (cacti_host_template_webserver_-_apache.xml)

进入Console ---> Import/Export ---> Import Templates ---> Save

为了采集Apache的运行时性能数据,我们需要Apache开启mod_status模块,这个模块将为Apache生成一个状态页面,Ubuntu默认已开启status模块 ,如未开启请用以下命令sudo a2enmod status开启
如果编译的需要增加上这个模块。

C.创建图像

D.apache2监控指标

首先是吞吐率,也就是Apache每秒处理的请求数,单位是“reqs/s”,这是Apache当前性能的重要指标。另一个指标就是并发连接数,它表示Apache当前同时处理的请求数,它由apache2.conf中的MaxClients来确定最大值。

E.允许访问状态页

Remote Host

sudo vi /etc/apache2/mods-available/status.conf

<IfModule mod_status.c>

<location /server-status>

SetHandler server-status

Order Deny,Allow

Deny from all

Allow from all #所有人都可访问状态页,可自定义IP

</location>


如果是编译的,加上这个,前提是需要装好模块
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.12
</Location>

你可能感兴趣的:(cacti监控apache)