标签:ora iad 网页 导出 sample adb fedora size --
被监控端只装agent
[root@6 ~]# yum -y install httpd mariadb-server mariadb php php-mysql #安装lamp
[root@6 ~]# yum -y install mysql-devel curl-devel net-snmp-devel libevent libevent-deve gcc l#依赖
[root@6 ~]# mysql -uroot -p123 #初始化数据库后
MariaDB [(none)]> create database zabbix;
MariaDB [(none)]> grant all on zabbix.* to zabbix@‘%‘ identified by ‘zabbix‘;
MariaDB [(none)]> flush privileges;
MariaDB [(none)]> \q
[root@ml ~]# tar xvf zabbix-3.4.3.gz #解压安装包。自己去官网下载
[root@6 ~]# cd zabbix-3.4.3/
[root@6 zabbix-3.4.3]# useradd -M -s /sbin/nologin zabbix
[root@6 zabbix-3.4.3]# ./configure --prefix=/usr/local/zabbix --enable-agent
[root@6 zabbix-3.4.3]# make install
[root@6 zabbix-3.4.3]# cd misc/init.d/fedora/core
[root@6 core]# cp zabbix_agentd /etc/init.d/
[root@6 core]# vim /etc/init.d/zabbix_agentd
BASEDIR=/usr/local/zabbix
[root@6 core]# /etc/init.d/zabbix_agentd start
[root@6 core]# netstat -atunp | grep zabb
指定主监控端
[root@6 core]# vim /usr/local/zabbix/etc/zabbix_agentd.conf
server=192.168.1.5(主监控ip) ServerActive=192.168.1.5(主监控ip) UnsafeUserParameters=1
在主监控检查是否能通信
[root@6 ~]# cd /usr/local/zabbix/bin
[root@6 bin]# ./zabbix_get -s 192.168.1.6 -p 10050 -k system.uname
Linux 6 3.10.0-862.el7.x86_64 #1 SMP Fri Apr 20 16:44:24 UTC 2018 x86_64
可以通信。
去网页添加
启用:
监控apache
[root@6 ~]# wget https://github.com/lorf/zapache/archive/master.zip #下载apache的监控模板
[root@6 ~]# unzip master.zip
[root@6 ~]# cd zapache-master/
[root@6 zapache-master]# cp httpd-server-status.conf.sample /etc/httpd/conf.d/httpd-server-status.conf
httpd-server-status.conf.sample 是用于配置server-status的上个步骤已经配置过了
userparameter_zapache.conf.sample 、zapache 关键的文件
zapache-template-active.xml zapache-template.xml模板
[root@6 zapache-master]# vim /etc/httpd/conf.d/httpd-server-status.conf
<Location /server-status> SetHandler server-status Order deny,allow Require all granted </Location>
[root@6 zapache-master]# systemctl restart httpd
[root@6 zapache-master]# cp zapache /usr/local/bin
[root@6 zapache-master]# cp userparameter_zapache.conf.sample /usr/local/zabbix/etc/zabbix_agentd.conf.d/
[root@6 zabbix_agentd.conf.d]# vim userparameter_zapache.conf.sample
UserParameter=zapache[*],/usr/local/bin/zapache \$1
[root@6 zabbix]# cd /usr/local/zabbix/
[root@6 zabbix]# vim etc/zabbix_agentd.conf
Include=/usr/local/zabbix/etc/zabbix_agentd.conf.d
将模板导出到电脑桌面,然后去网页去添加。
导入!
打完勾勾后(apache下的一些)可以选择
、、、
标签:ora iad 网页 导出 sample adb fedora size --
原文地址:https://www.cnblogs.com/meml/p/12711994.html