当前位置:网站首页>使用自定义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
边栏推荐
- 利用内网穿透,实现公网访问内网
- Leetcode剑指offer JZ9 双栈实现队列
- IP课笔记(4)
- Getting started with Lunix commands - user and file permissions (Chmod details)
- [219] what is the difference between app testing and web testing?
- Unity shader migrated from built-in rendering pipeline to URP
- Data set and pre training model
- Leetcode sword finger offer jz25 merges two sorted linked lists
- Use and principle of spark broadcast variable and accumulator
- jz47 礼物的最大价值(动态规划思路)
猜你喜欢
![[226] instructions for Wireshark parameters](/img/47/0d3fd221695920e02b1f690a2a21c1.png)
[226] instructions for Wireshark parameters

Top 10 vulnerability assessment and penetration testing tools

IP notes (9)

awk的使用

Maximum value of jz47 gifts (dynamic planning ideas)

Simple three-step fast intranet penetration

如何建立一个仪式感点满的网站,并发布到公网 1-2

第二周作业

手动安装Apache

Leetcode sword finger offer jz25 merges two sorted linked lists
随机推荐
【217】#!/usr/bin/env 的意义
IP job (6)
Interview questions for Test Manager / test team leader / Test Supervisor
LuckyFrameWeb测试平台(一款支持接口自动化、WEB UI自动化、APP自动化,并且支持分布式测试的全纬度免费开源测试平台)
Configure a fixed remote desktop address [intranet penetration, no need for public IP]
服务器硬件及RAID配置实战
迭代器与生成器
Custom MVC 1.0
go的环境搭建和起步
IP class notes (5)
Flink restart policy
IP笔记(10)
IP笔记(7)
The public network uses Microsoft Remote Desktop remote desktop to work remotely at any time
【301】怪诞行为学-可预测的非理性
一个测试经理/测试主管/测试总监的工作总结
将内网映射到公网【无需公网IP】
Ia note 1
[218] what are the advantages and disadvantages of CS architecture and BS architecture and data on the server and client?
Tensorflow GPU installation -- 056