当前位置:网站首页>Zabbix 5.0 Monitoring Tutorial (2)
Zabbix 5.0 Monitoring Tutorial (2)
2022-08-03 00:04:00 【star】
目录
五、解决 zabbix-server View graphics garbled question
3.See if in the automatic discovery has found the new host
部署 zabbix 客户端
在 Zabbix 5.0版本
agent2 新版本采用 golang 语言开发的客户端,由于是go语言开发,Deploy rise very convenient,And before application deployment form different
agnet2 默认用10050端口,也就是zabbix客户端
·旧版本的客户端,zabbix-agent
·goLanguage version of the client,zabbix-agent2
| IP | 操作系统 | 主机名 | 服务名 | |
| 服务端 | 192.168.78.131 | CentOS 7 | server02 | zabbix-server、zabbix-agent |
| 客户端 | 192.168.78.128 | CentOS 7 | client01 | |
| 客户端 | 192.168.78.132 | CentOS 7 | client02 |
一、环境初始化
可以看下面这篇文章
二、同步北京时间
yum install -y ntpdate
ntpdate -u ntp.aliyun.com
mv /etc/localtime{,.bak} # 备份
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime三、zabbix-agent2 部署流程
1.# 下载 zabbix yum 源
rpm -Uvh https://mirrors.aliyun.com/zabbix/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
2.# 更换 zabbix.repo 为阿里源
sed -i 's#http://repo.zabbix.com#https://mirrors.aliyun.com/zabbix#' /etc/yum.repos.d/zabbix.repo
3.# 安装 zabbix-agent2
yum -y install zabbix-agent2
4.# 启动 zabbix-agent2 并设置开机自启
systemctl enable --now zabbix-agent2.service
netstat -ntpl | grep zabbix
5.# 修改配置文件
vim /etc/zabbix/zabbix_agent2.conf
# Mandatory: yes, if StartAgents is not explicitly set to 0
# Default:
# Server=
Server=192.168.78.131 # 修改为服务端的ip
# Mandatory: no
# Default:
# ServerActive=
ServerActive=192.168.78.131 # 修改为服务端的ip
# Mandatory: no
# Default:
# Hostname=
Hostname=Zabbix-client01 # Is modified to the client host name
6.# 查看是否修改成功
[[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.78.131
ServerActive=192.168.78.131
Hostname=Zabbix-client01
Include=/etc/zabbix/zabbix_agent2.d/*.conf
ControlSocket=/tmp/agent.sock
7.# 重启 zabbix-agent2
systemctl restart zabbix-agent2.service四、验证 zabbix-agent2 的连通性
1.# Active access to customer service in the server end data
[[email protected] ~]# yum install -y zabbix-get
2.# Command links on test server is the client
[[email protected] ~]# zabbix_get -s '192.168.78.132' -p 10050 -k 'agent.ping'
1
[[email protected] ~]# zabbix_get -s '192.168.78.132' -p 10050 -k 'system.hostname'
client02
五、解决 zabbix-server View graphics garbled question

# On the server install Chinese fonts
[[email protected] ~]# yum -y install wqy-microhei-fonts
# 复制字体
[[email protected] ~]# \cp /usr/share/fonts/wqy-microhei/wqy-microhei.ttc /usr/share/fonts/dejavu/DejaVuSans.ttf恢复正常:

六、添加 zabbix-agent 主机
以下两种方法(自动发现、自动注册)Can automatically add client host:
自动发现
zabbixMonitoring and control system provides an efficient and flexible automated discovery function,This feature is very useful when large-scale deployment of monitoring.主要由serverEnd a discovery process,定时扫描.主要有以下优点:
- 加快Zabbix部署
- 简化管理
- 在快速变化的环境中使用Zabbix,无需过多管理
- 规则
Automatic discovery based on the following information
- 可用的外部服务(FTP、SSH、WEB、POP3、IMAP、TCP 等)
- 来自 Zabbix 客户端的信息(仅支持未加密模式)
- 来自 SNMP 客户端的信息
Automatic discovery includes two stages
1.发现
2.动作
1.创建自动发现规则

2.添加动作
Associated automatically discover rules


3.See if in the automatic discovery has found the new host
监测-自动发现

自动注册
Zabbix Active agent可以实现自动注册,Which server to monitor its.通过这种方式,无需在服务器上进行手动配置便可直接启动对新host的监控.Was sponsored by the client,并且需要安装agent服务.
In the current our own cloud application environment,I'm more inclined to use automatic registration.Automatic register rules:
- If the host metadata information change:
- 由于HostMetadataHas changed and the agent has to restart
- 由于HostMetadataItemThe return value is changed
- For the lack of metadata manually create host
- If manual will host changes for anotherZabbix代理监视
- If the same host automatically registered from newZabbix代理
1.配置动作


Select operation TAB
Associated with the following:

解释说明:
- 发送消息给administrators组
- 添加主机
- 关联到linux servers组
- 关联zabbix agent模版
The above if the match is successful,As the above process to complete automatic registration operation
After the completion of the created to ensure that the state as已启用

等待1-2分钟检查,Check has been added successfully:
边栏推荐
- Informatics Olympiad All-in-One (1260: [Example 9.4] Intercepting Missiles (Noip1999))
- Bena's life cycle
- golang刷leetcode:到达角落需要移除障碍物的最小数目
- 2018HBCPC个人题解
- .NET性能优化-你应该为集合类型设置初始大小
- golang刷leetcode:按位与结果大于零的最长组合
- Common tools and test methods for interface testing (Introduction)
- 华为设备配置BFD多跳检测
- golang 刷leetcode:从栈中取出 K 个硬币的最大面值和
- C# Barrier类
猜你喜欢

PyRosetta 安装方法之Conda安装

微软SQL服务器被黑客入侵以窃取代理服务的带宽
SublimeText3 安装、配置项、包管理、常用必备插件、常用快捷键以及修改

SSM整合步骤(重点)

管理工具|宝藏书签收藏管理工具

The software testing process specification is what?Specific what to do?

Flink Yarn Per Job - 创建启动Dispatcher RM JobManager

源码构建LAMP环境-2
包管理工具npm- node package management相关知识 、检查包更新、NPM包上传、更换镜像、npm ERR! registry error parsing json

总结嵌入式C语言难点(2部分)
随机推荐
apache calcite中关于model文件配置
树形结构构造示例代码
框架设计:PC 端单页多页框架如何设计与落地
30天啃透这份Framework 源码手册直接面进大厂
数据库分析与优化
golang刷leetcode: 小于等于 K 的最长二进制子序列
浅议.NET遗留应用改造
sre成长之路
A brief discussion on the transformation of .NET legacy applications
包管理工具Chocolate - Win10如何安装Chocolate工具、快速上手、进阶用法
C# Barrier类
【3D视觉】深度摄像头与3D重建
人尽皆知的云原生,到底是大势所趋还是过度炒作?
js如何获取浏览器缩放比例
[C题目]力扣141. 环形链表
golang刷letcode:公司命名
管理工具|宝藏书签收藏管理工具
C#异步和多线程
用了TCP协议,就一定不会丢包吗?
WPF development through practical 】 【 automatic production management platform