日历存档: 2018 年 11 月 24 日

Zabbix监控Apache性能

分类:linux, 运维技术日期:2018-11-24 - 14:39:19评论:0条作者:老谢

  和之前写过的Zabbix 3.2 agentd监控Nginx性能原理差不多,都是通过web引擎输出status信息来进行性能监控,一般情况下我们需要对ReqPerSec、BytesPerSec、BusyWorkers、IdleWorkers四个数据进行关注。

开启Apache Status
Listen 80
<VirtualHost *:80>
    CustomLog /dev/null common
    ErrorLog /dev/null
    <Location "/server-status">
        SetHandler server-status
        Require ip 127.0.0.1
    </Location>
</VirtualHost>

  我这里生产环境监控的是一台WHM服务器,默认开启apache status,访问地址为http://127.0.0.1:80/whm-server-status?auto,正常情况下应该如下页面内容:

Apache Server Status for 127.0.0.1 (via 127.0.0.1)
Server Version: Apache/2.4.37 (cPanel) OpenSSL/1.0.2p mod_bwlimited/1.4
Server MPM: prefork
Server Built: Oct 29 2018 18:29:24
Current Time: Thursday, 22-Nov-2018 13:48:50 CST
Restart Time: Thursday, 22-Nov-2018 13:48:35 CST
Parent Server Config. Generation: 1
Parent Server MPM Generation: 0
Server uptime: 15 seconds
Server load: 0.05 0.09 0.08
Total accesses: 7 – Total Traffic: 54 kB – Total Duration: 19687
CPU Usage: u.02 s0 cu0 cs0 – .133% CPU load
.467 requests/sec – 3686 B/second – 7.7 kB/request – 2812.43 ms/request
7 requests currently being processed, 4 idle workers

……………

继续阅读…

Tags: ,