当前位置:网站首页>使用自定义zabbix包(4.0.5版本)安装agent和proxy
使用自定义zabbix包(4.0.5版本)安装agent和proxy
2022-07-24 05:23:00 【踩坑之路】
# 解压包 tar -xf zabbix-agent-proxy-4.0.5-1.el7.x86_64.rpm.tgz
1 使用proxy代理
1.1 安装proxy
# 安装proxy,使用MySQL数据库 yum install -y zabbix-proxy-mysql-4.0.5-1.el7.x86_64.rpm # 修改配置文件 [[email protected] ~]# cat /etc/zabbix/zabbix_proxy.conf # zabbix-server主机ip Server=49.4.10.222 # zabbix-server主机端口 ServerPort=10051 # 代理主机名称,建议使用主机名 Hostname=local # proxy端口 ListenPort=10051 # proxy日志文件 LogFile=/var/log/zabbix/zabbix_proxy.log LogFileSize=0 PidFile=/var/run/zabbix/zabbix_proxy.pid SocketDir=/var/run/zabbix # proxy连接MySQL的地址,需要根据实际情况更改 DBHost=127.0.0.1 # proxy数据库名 DBName=zabbix_proxy # proxy数据库用户名 DBUser=zabbix_proxy # proxy数据库密码 DBPassword=zabbix_proxy ConfigFrequency=300 DataSenderFrequency=60 SNMPTrapperFile=/var/log/snmptrap/snmptrap.log CacheSize=128M Timeout=30 ExternalScripts=/usr/lib/zabbix/externalscripts LogSlowQueries=3000
1.2 配置文件
# zabbix_proxy文件 配置文件:/etc/zabbix/zabbix_proxy.conf 日志文件:/var/log/zabbix/zabbix_proxy.log PID文件:/var/run/zabbix/zabbix_proxy.pid # zabbix_proxy MySQL数据库创建请参考1.3章节
1.3 zabbix_proxy数据库(MySQL)创建
# 创建zabbix_proxy数据库 create database zabbix_proxy character set utf8 collate utf8_bin; create user [email protected] identified by 'zabbix_proxy'; grant all privileges on zabbix_proxy.* to [email protected] identified by 'zabbix_proxy'; flush PRIVILEGES; # 将zabbix_proxy的sql文件导入到zabbix_proxy库中 gunzip /usr/share/doc/zabbix-proxy-mysql-4.0.5/schema.sql.gz mysql -uroot -p密码 zabbix_proxy < /usr/share/doc/zabbix-proxy-mysql-4.0.5/schema.sql
1.4 启动zabbix_proxy服务
# 启动zabbix-proxy,并设置开机自启 systemctl start zabbix-proxy && systemctl enable zabbix-proxy
2 不使用proxy代理
2.1 安装agent
# 不使用proxy代理时,直接安装agent连接到server端即可 yum install -y zabbix-agent-4.0.5-1.el7.x86_64.rpm # 修改配置文件 [[email protected] ~]# cat /etc/zabbix/zabbix_agentd.conf PidFile=/var/run/zabbix/zabbix_agentd.pid LogFile=/var/log/zabbix/zabbix_agentd.log LogFileSize=200 DebugLevel=3 EnableRemoteCommands=1 Server=Zabbix Server # server端地址 ListenIP=0.0.0.0 ServerActive=Zabbix Server # server端地址 Hostname=local # agent主机名 RefreshActiveChecks=60 Include=/etc/zabbix/zabbix_agentd.d/*.conf UnsafeUserParameters=1
2.2 配置文件
# zabbix_agent文件 配置文件:/etc/zabbix/zabbix_agentd.conf 日志文件:/var/log/zabbix/zabbix_agentd.log PID文件:/var/run/zabbix/zabbix_agentd.pid 自定义脚本文件目录:/etc/zabbix/scripts/ 自定义配置文件目录:/etc/zabbix/zabbix_agentd.d/ 自定义模板文件目录:/etc/zabbix/templates/
2.3 启动zabbix_agent服务
# 启动zabbix-agent,并设置开机自启 systemctl start zabbix-agent && systemctl enable zabbix-agent
边栏推荐
- Dameng database_ Dmfldr tool instructions
- Life warning Maxim
- leetcode剑指offer JZ23:链表中环的入口节点
- go语言常用命令和包管理
- Configure a fixed remote desktop address [intranet penetration, no need for public IP]
- Maximum value of jz47 gifts (dynamic planning ideas)
- How to build a website full of ritual sense and publish it on the public website 1-2
- Flink state use
- 【251】常见的测试工具
- Using keras and LSTM to realize time series prediction of long-term trend memory -lstnet
猜你喜欢

【222】内存溢出及定位
![[218] what are the advantages and disadvantages of CS architecture and BS architecture and data on the server and client?](/img/d8/a367c26b51d9dbaf53bf4fe2a13917.png)
[218] what are the advantages and disadvantages of CS architecture and BS architecture and data on the server and client?
![Public access intranet IIS website server [no public IP required]](/img/e5/45d7c59ed30bbf901f793f25e229e2.png)
Public access intranet IIS website server [no public IP required]

Leetcode sword finger offer jz25 merges two sorted linked lists

Customize MVC 3.0

Do not rent servers, build your own personal business website (3)

TensorFlow-GPU 安装 -- 056

【217】#!/ The meaning of usr/bin/env

Playing RTSP video stream on webpage

Leetcode sword finger offer JZ9 dual stack implementation queue
随机推荐
Unity 3D frame rate statistics script
Ia class summary (1)
Leetcode does not add, subtract, multiply, divide, and calculate the number of 1 in binary
Flink checkpoint configuration details
IP job (2) rip
Leetcode refers to offer jz5 to replace the space string
手动安装Apache
General paging 01
迭代器与生成器
leetcode剑指offer JZ23:链表中环的入口节点
Luckyframeweb testing platform (a full latitude free open source testing platform that supports interface automation, Web UI automation, APP automation, and distributed testing)
本地搭建WordPress个人博客,并内网穿透发布上线 (22)
Li Kou 986. Intersection of interval lists
IP作业(6)
[219] what is the difference between app testing and web testing?
【219】app 测试和web测试的区别点?
ip作业(1)
Simple but easy to use: using keras 2 to realize multi-dimensional time series prediction based on LSTM
Map the intranet to the public network [no public IP required]
IP notes (9)