当前位置:网站首页>zabbix 5.0监控客户端
zabbix 5.0监控客户端
2022-07-04 07:37:00 【拥抱云原生】
zabbix客户端部署
agent2新版本采用golang语言开发,可以在多核上运行
agent2默认用10050端口,也就是zabbix客户端的端口
- 旧版本客户端,zabbix-agent
- 新版本客户端,zabbix-agent2
#机器环境准备,1态zabbix客户端(自己电脑性能好可以配置多台)
192.168.10.51 zabbix-agent1
1.关闭防火墙和selinux
[[email protected] ~]# systemctl stop firewalld && systemctl disable firewalld
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[[email protected] ~]# setenforce 0
[[email protected] ~]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
2.注意时间配置(server也要同步)
yum install -y ntpdate
ntpdate -u ntp.aliyun.com
4.时区的统一配置(server也要同步)
mv /etc/localtime{
,.bak}
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
5.配置主机名
hostnamectl set-hostname zabbix-agent1
6.配置好zabbix的yum源
rpm -Uvh https://mirrors.aliyun.com/zabbix/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
sed -i 's#http://repo.zabbix.com#https://mirrors.aliyun.com/zabbix#' /etc/yum.repos.d/zabbix.repo
7.下载agent2客户端
yum install -y zabbix-agent2
8.启动客户端并设置开机自启
[[email protected] ~]# systemctl enable --now zabbix-agent2
[[email protected] ~]# netstat -tunlp |grep zabbix
tcp6 0 0 :::10050 :::* LISTEN 8023/zabbix_agent2
9.修改客户端的配置文件
[[email protected] ~]# grep -Ev '^#|^$' /etc/zabbix/zabbix_agent2.conf
PidFile=/var/run/zabbix/zabbix_agent2.pid
LogFile=/var/log/zabbix/zabbix_agent2.log
LogFileSize=0
Server=192.168.10.50
ServerActive=192.168.10.50
Hostname=zabbix-agent1
Include=/etc/zabbix/zabbix_agent2.d/*.conf
ControlSocket=/tmp/agent.sock
10.重新启动客户端
systemctl restart zabbix-agent2
11.测试zabbix客户端的流通性
服务端执行:
yum install -y zabbix-get
[[email protected] ~]# zabbix_get -s '192.168.10.51' -p 10050 -k 'agent.ping'
1
[[email protected] ~]# zabbix_get -s '192.168.10.51' -p 10050 -k 'system.hostname'
zabbix-agent1
zabbix默认检测了服务器本身,但是编码有问题
1.安装字体
yum install -y wqy-microhei-fonts
2.复制字体(\cp,表示去掉alias别名)
\cp /usr/share/fonts/wqy-microhei/wqy-microhei.ttc /usr/share/fonts/dejavu/DejaVuSans.ttf
添加zabbix-agent主机
进入zabbix的web页面 —> 配置 —> 主机 —> 创建主机 —> 模板 —> 创建



边栏推荐
- Introduction to sap commerce cloud B2B organization function
- Boast about Devops
- PCIe knowledge points -010: where to get PCIe hot plug data
- 2022 - 021arts: début du deuxième semestre
- MySQL error resolution - error 1261 (01000): row 1 doesn't contain data for all columns
- Go learning notes - constants
- 论文学习——基于极值点特征的时间序列相似性查询方法
- Zhanrui tankbang | jointly build, cooperate and win-win zhanrui core ecology
- Zephyr study notes 2, scheduling
- Preliminary study on temporal database incluxdb 2.2
猜你喜欢

SQL注入测试工具之Sqli-labs下载安装重置数据库报错解决办法之一(#0{main}thrown in D:\Software\phpstudy_pro\WWW\sqli-labs-……)

Unity opens the explorer from the inspector interface, selects and records the file path

Zhanrui tankbang | jointly build, cooperate and win-win zhanrui core ecology

Routing decorator of tornado project

window上用.bat文件启动项目

"Sword finger offer" 2nd Edition - force button brush question

MySQL中的文本处理函数整理,收藏速查

Rhcsa the next day

Oracle-存储过程与函数

Node foundation ~ node operation
随机推荐
提升复杂场景三维重建精度 | 基于PaddleSeg分割无人机遥感影像
Introduction to rce in attack and defense world
Basic DOS commands
Take you to master the formatter of visual studio code
【FreeRTOS】FreeRTOS学习笔记(7)— 手写FreeRTOS双向链表/源码分析
socket inet_ pton() inet_ Ntop() function (a new network address translation function, which converts the expression format and numerical format to each other. The old ones are inet_aton(), INET_ ntoa
PCIE知识点-010:PCIE 热插拔资料从哪获取
Zephyr 學習筆記2,Scheduling
L1-024 the day after tomorrow (5 points)
Electronic Association C language level 1 34, piecewise function
Boosting the Performance of Video Compression Artifact Reduction with Reference Frame Proposals and
L1-027 rental (20 points)
Pangu open source: multi support and promotion, the wave of chip industry
[C language] open the door of C
The number of patent applications in China has again surpassed that of the United States and Japan, ranking first in the world for 11 consecutive years
PCIe knowledge points -010: where to get PCIe hot plug data
MySQL error resolution - error 1261 (01000): row 1 doesn't contain data for all columns
flask-sqlalchemy 循环引用
win10微软拼音输入法输入文字时候下方不出现中文提示
Oracle-存储过程与函数