当前位置:网站首页>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页面 —> 配置 —> 主机 —> 创建主机 —> 模板 —> 创建
边栏推荐
- [freertos] freertos Learning notes (7) - written freertos bidirectionnel Link LIST / source analysis
- The IP bound to the socket is inaddr_ The meaning of any htonl (inaddr_any) (0.0.0.0 all addresses, uncertain addresses, arbitrary addresses)
- Take you to master the formatter of visual studio code
- 博客停更声明
- Activiti常见操作数据表关系
- 如何用MOS管来实现电源防反接电路
- Easy to understand: understand the time series database incluxdb
- 节点基础~节点操作
- [Gurobi] 简单模型的建立
- SQL foundation 9 [grouping data]
猜你喜欢
Introduction to neural network (Part 2)
[network security] what is emergency response? What indicators should you pay attention to in emergency response?
University stage summary
Oracle stored procedures and functions
Improve the accuracy of 3D reconstruction of complex scenes | segmentation of UAV Remote Sensing Images Based on paddleseg
JVM中堆概念
Blog stop statement
Zephyr 学习笔记2,Scheduling
两年前美国芯片扭捏着不卖芯片,如今芯片堆积如山祈求中国帮忙
Used on windows Bat file startup project
随机推荐
Oracle-存储过程与函数
[untitled] notice on holding "2022 traditional fermented food and modern brewing technology"
Take you to master the formatter of visual studio code
[real case] how to deal with the failure of message consumption?
Activiti common operation data table relationship
时序数据库 InfluxDB 2.2 初探
【FreeRTOS】FreeRTOS學習筆記(7)— 手寫FreeRTOS雙向鏈錶/源碼分析
Zephyr 學習筆記2,Scheduling
flask-sqlalchemy 循环引用
I was pressed for the draft, so let's talk about how long links can be as efficient as short links in the development of mobile terminals
2022 - 021arts: début du deuxième semestre
Flask 常用组件
Zephyr 学习笔记1,threads
Advanced MySQL: Basics (5-8 Lectures)
2022-021ARTS:下半年开始
The cloud native programming challenge ended, and Alibaba cloud launched the first white paper on application liveliness technology in the field of cloud native
System architecture design of circle of friends
大学阶段总结
Technical experts from large factories: common thinking models in architecture design
The IP bound to the socket is inaddr_ The meaning of any htonl (inaddr_any) (0.0.0.0 all addresses, uncertain addresses, arbitrary addresses)