当前位置:网站首页>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页面 —> 配置 —> 主机 —> 创建主机 —> 模板 —> 创建
边栏推荐
- This monitoring system can monitor the turnover intention and fishing all, and the product page has 404 after the dispute appears
- Flask 常用组件
- Google's official response: we have not given up tensorflow and will develop side by side with Jax in the future
- One of the general document service practice series
- MySQL 数据库 - 函数 约束 多表查询 事务
- MySQL中的文本處理函數整理,收藏速查
- MySQL中的文本处理函数整理,收藏速查
- [Gurobi] 简单模型的建立
- SQL注入测试工具之Sqli-labs下载安装重置数据库报错解决办法之一(#0{main}thrown in D:\Software\phpstudy_pro\WWW\sqli-labs-……)
- L1-023 output gplt (20 points)
猜你喜欢
tornado项目之路由装饰器
Preliminary study on temporal database incluxdb 2.2
JVM -- class loading process and runtime data area
Unity 从Inspector界面打开资源管理器选择并记录文件路径
大学阶段总结
Master-slave replication principle of MySQL database
Detailed introduction to the big changes of Xcode 14
Write a thread pool by hand, and take you to learn the implementation principle of ThreadPoolExecutor thread pool
L1-027 rental (20 points)
弈柯莱生物冲刺科创板:年营收3.3亿 弘晖基金与淡马锡是股东
随机推荐
This article is enough for learning advanced mysql
[FreeRTOS] FreeRTOS learning notes (7) - handwritten FreeRTOS two-way linked list / source code analysis
Transition technology from IPv4 to IPv6
Write a thread pool by hand, and take you to learn the implementation principle of ThreadPoolExecutor thread pool
L1-025 positive integer a+b (15 points)
Node foundation ~ node operation
It's healthy to drink medicinal wine like this. Are you drinking it right
Google's official response: we have not given up tensorflow and will develop side by side with Jax in the future
【森城市】GIS数据漫谈(一)
Recursive Fusion and Deformable Spatiotemporal Attention for Video Compression Artifact Reduction
Implementation of ZABBIX agent active mode
[Gurobi] 简单模型的建立
Activiti常见操作数据表关系
BUUCTF(3)
L1-027 rental (20 points)
Book list | as the technical support Party of the Winter Olympics, Alibaba cloud's technology is written in these books!
Two years ago, the United States was reluctant to sell chips, but now there are mountains of chips begging China for help
How to buy financial products in 2022?
Rhcsa the next day
Oceanbase is the leader in the magic quadrant of China's database in 2021