搭建zabbix监控windows

所用工具是centos7和zabbix2.4.8

所有安装都是yum安装的

先配置一个zabbix的yum仓库

这个是网址:http://repo.zabbix.com/zabbix/2.4/rhel/7/x86_64/


yum install zabbix-2.4.8-1.el7.x86_64.rpm zabbix-server-2.4.8-1.el7.x86_64.rpm zabbix-server-mysql-2.4.8-1.el7.x86_64.rpm zabbix-agent-2.4.8-1.el7.x86_64.rpm zabbix-sender-2.4.8-1.el7.x86_64.rpm zabbix-web-2.4.8-1.el7.noarch.rpm zabbix-get-2.4.8-1.el7.x86_64.rpm  zabbix-web-mysql-2.4.8-1.el7.noarch.rpm trousers-0.3.11.2-4.el7_1.x86_64.rpm


创建数据库:


server和proxy的运行都依赖于数据库,agent则不需要。


以MySQL数据库为例:
shell> mysql -uroot -p<password>
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by '<password>';
mysql> quit;
shell> mysql -uzabbix -p<password> zabbix < database/mysql/schema.sql
# stop here if you are creating database for Zabbix proxy
shell> mysql -uzabbix -p<password> zabbix < database/mysql/images.sql
shell> mysql -uzabbix -p<password> zabbix < database/mysql/data.sql

配置zabbix:


(1) zabbix_server
server的配置文件为zabbix_server.conf,至少应该为其配置数据库等相关的信息;例如:
LogFile=/var/log/zabbix/zabbix_server.log
LogFileSize=0
PidFile=/var/run/zabbix/zabbix_server.pid

(2) 配置php环境
编辑/etc/httpd/conf.d/zabbix.conf,添加如下项。
   php_value date.timezone Asia/Shanghai


  启动httpd服务:systemctl start httpd.service


  访问zabbix web
  http://your_host/zabbix


  登录:Admin/zabbix


(3) 配置zabbix_agent
agent的配置文件为zaabix_agentd.conf,至少应该为其指定server的IP地址;
DBHost=172.16.100.67
DBName=zabbix
DBUser=zbxuser
DBPassword=zbxpass
DBSocket=/var/lib/mysql/mysql.sock
SNMPTrapperFile=/var/log/snmptt/snmptt.log
AlertScriptsPath=/usr/lib/zabbix/alertscripts
ExternalScripts=/usr/lib/zabbix/externalscripts


注意:/etc/zabbix/zabbix_server.conf中的DBPassword一定要开启,不然会报zabbix不在线的错误

win7上配置zabbix-agent:

下载地址:   https://www.zabbix.com/downloads/2.4.0/zabbix_agents_2.4.0.win.zip

  以管理员的运行cmd

  C:\zabbix\bin\win64\zabbix_agent -c  C:\zabbix\conf\zabbix_agentd.win -i -i先安装zabbix

C:\zabbix\bin\win64\zabbix_agent -c  C:\zabbix\conf\zabbix_agentd.win -s -s运行zabbix

注意:此方法在win10上会遇到故障,无法启动zabbix ,在win7上适用

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值