centos 6.5 zabbix3.0.4 监控apache
2016-09-19 13:05
531 查看
开启apache的server-status
httpd.conf 末尾添加
重启apache
浏览器http://localhost/server-status
或
重启zabbix
下载模板
解压
把文件放到相应的目录
[root@test3 zabbix_agentd.conf.d]# cat userparameter_zapache.conf
#
# This is a sample zabbix_agentd config file.
# Put it to /etc/zabbix_agentd.conf.d or otherwise integrate into agent config.
# Edit to your needs.
#
UserParameter=zapache[*],/var/lib/zabbixsrv/externalscripts/zapache \$1
修改下路径
UserParameter=zapache[*],/usr/local/bin/zapache \$1
把zapache文件放到usr/local/bin
[root@test3 zabbix_agentd.conf.d]# cd /zapache-master/
[root@test3 zapache-master]# cp zapache /usr/local/bin/
查看是否有执行权限
[root@test3 bin]# ll zapache
-rwxr-xr-x 1 root root 6110 Sep 9 16:35 zapache
没有权限可执行下面命令
[root@test3 bin]# chmod +x zapache
修改zabbix -agentd.conf
导入模板
关联模板
配置-主机(选择apache客户端)
模板-选择(选择上面导入的模板)-添加-更新
在web页面查看是否有数据
httpd.conf 末尾添加
[root@test3 /]# vim /usr/local/httpd-2.2.31/conf/httpd.conf ExtendedStatus On <location /server-status> SetHandler server-status Order Allow,Deny Allow from all </location>
重启apache
[root@test3 /]# /usr/local/bin/apachectl -t Syntax OK [root@test3 /]# /usr/local/bin/apachectl restart
浏览器http://localhost/server-status
或
[root@test3 /]# curl localhost/server-status
重启zabbix
[root@test3 /]# /etc/init.d/zabbix_agentd restart Shutting down zabbix_agentd: [ OK ] Starting zabbix_agentd: [ OK ]
下载模板
[root@test3 /]# wget https://github.com/lorf/zapache/archive/master.zip
解压
[root@test3 /]# unzip master.zip Archive: master.zip 24a764b2e224f9b8d0a6bc94dcadd7568b2fe650 creating: zapache-master/ inflating: zapache-master/README.md inflating: zapache-master/httpd-server-status.conf.sample inflating: zapache-master/userparameter_zapache.conf.sample inflating: zapache-master/zapache inflating: zapache-master/zapache-template-active.xml inflating: zapache-master/zapache-template.xml [root@test3 /]# cd zapache-master/ [root@test3 zapache-master]# ls httpd-server-status.conf.sample zapache README.md zapache-template-active.xml userparameter_zapache.conf.sample zapache-template.xml
把文件放到相应的目录
[root@test3 zapache-master]# cp userparameter_zapache.conf.sample /usr/local/zabbix/etc/zabbix_agentd.conf.d/ [root@test3 zabbix_agentd.conf.d]# mv userparameter_zapache.conf.sample userparameter_zapache.conf
[root@test3 zabbix_agentd.conf.d]# cat userparameter_zapache.conf
#
# This is a sample zabbix_agentd config file.
# Put it to /etc/zabbix_agentd.conf.d or otherwise integrate into agent config.
# Edit to your needs.
#
UserParameter=zapache[*],/var/lib/zabbixsrv/externalscripts/zapache \$1
修改下路径
UserParameter=zapache[*],/usr/local/bin/zapache \$1
把zapache文件放到usr/local/bin
[root@test3 zabbix_agentd.conf.d]# cd /zapache-master/
[root@test3 zapache-master]# cp zapache /usr/local/bin/
查看是否有执行权限
[root@test3 bin]# ll zapache
-rwxr-xr-x 1 root root 6110 Sep 9 16:35 zapache
没有权限可执行下面命令
[root@test3 bin]# chmod +x zapache
修改zabbix -agentd.conf
[root@test3 bin]# vim /usr/local/zabbix/etc/zabbix_agentd.conf Include=/usr/local/zabbix/etc/zabbix_agentd.conf.d/
导入模板
关联模板
配置-主机(选择apache客户端)
模板-选择(选择上面导入的模板)-添加-更新
在web页面查看是否有数据
相关文章推荐
- CentOS 6.5 zabbix 3.0.4 监控MySQL性能
- Centos6.3下zabbix监控apache server-status
- CentOS6.5安装zabbix监控及汉化
- 搭建Linux(centos5.5)+Apache2+Mysql5+Php5+zabbix1.8.5系统环境实现网络状况监控
- Centos6.3下zabbix监控apache server-status来明白zabbix原理
- zabbix3.0.4利用iostat工具监控centos主机磁盘IO
- 搭建Linux(centos5.3)+Apache2+Mysql5+Php5+zabbix1.8.5系统环境实现网络状况监控
- CentOS 6.5 zabbix 3.0.4 乱码问题
- CentOS-6.5安装zabbix 3.0.4
- Centos6.5 zabbix3.2.6监控mysql
- Centos 6.5 下安装 Zabbix server 3.0服务器的安装及 监控主机的加入(2)
- CentOS6.5安装zabbix监控及汉化
- CentOS 6.5 zabbix 3.0.4 SendEmail报警
- CentOS 6.5 LNMP架构Zabbix 3.2.4监控端搭建
- zabbix3.0.4 监控apache
- Centos 6.5 监控路由器、思科交换机Nagios (三)
- mikoomi -Zabbix监控Apache Hadoop插件/模板 (翻译)
- Centos6.5_salt自动部署zabbix_agentd(一)--目录规划
- Ubuntu14.04 & CentOS6.5 编译安装Apache & PHP5.6
- CentOS6.0(64位)下Apache+PHP+Mysq+zabbix2.4.1安装