使用zabbix 2.4监控httpd

环境:centos 6.5、httpd 2.4、zabbix 2.4

1、修改apache配置文件

1
2
3
4
5
6
7
8
vim  /etc/httpd/httpd .conf
ExtendedStatus On 
<location  /server-status >
    SetHandler server-status
    Order allow,deny
    Allow from localhost
    Allow from 192.168.100.1
< /location >

2、下载解压zapache-master.zip 

1
2
3
4
5
6
7
wget https: //github .com /lorf/zapache/archive/master .zip
unzip zapache-master.zip 
cd  zapache-master
mkdir  /usr/local/zabbix/scripts
cp  zapache  /usr/local/zabbix/scripts/
chmod  +x  /usr/local/zabbix/scripts/zapache 
cp  userparameter_zapache.conf.sample  /usr/local/zabbix/etc/zabbix_agentd .conf.d /userparameter_zapache .conf

3、修改userparameter_zapache.conf

1
2
vim  /usr/local/zabbix/etc/zabbix_agentd .conf.d /userparameter_zapache .conf
UserParameter=zapache[*], /usr/local/zabbix/scripts/zapache  \$1

4、修改zabbix_agentd.conf

1
2
3
4
5
6
7
8
vim  /usr/local/zabbix/etc/
LogFile= /tmp/zabbix_agentd .log
Server=192.168.100.161
ServerActive=192.168.100.161
Hostname=Zabbix server
Include= /usr/local/zabbix/etc/zabbix_agentd .conf.d/
EnableRemoteCommands=1
UnsafeUserParameters=1

5、重启zabbix_agentd服务

1
service zabbix_agentd restart

6、在zabbix server上验证

1
zabbix_get -s 192.168.100.162 -k zapache[ ping ]

7、通过浏览器导入模板Template App Apache Web Server zapache

参考博文:http://jaychang.iteye.com/blog/2215945



     本文转自1321385590 51CTO博客,原文链接http://blog.51cto.com/linux10000/1728194:,如需转载请自行联系原作者




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值