当前位置:网站首页>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页面 —> 配置 —> 主机 —> 创建主机 —> 模板 —> 创建



边栏推荐
- The idea of implementing charts chart view in all swiftui versions (1.0-4.0) was born
- Label management of kubernetes cluster
- OKR vs. KPI 一次搞清楚这两大概念!
- 弈柯莱生物冲刺科创板:年营收3.3亿 弘晖基金与淡马锡是股东
- Advanced MySQL: Basics (5-8 Lectures)
- 2022 - 021arts: début du deuxième semestre
- 促进OKR落地的工作总结该如何写?
- Experience installing VMware esxi 6.7 under VMware Workstation 16
- Preliminary study on temporal database incluxdb 2.2
- 电子协会 C语言 1级 35 、银行利息
猜你喜欢

flask-sqlalchemy 循环引用

System architecture design of circle of friends

Take you to master the formatter of visual studio code

Adaptive spatiotemporal fusion of multi-target networks for compressed video perception enhancement

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

谷歌官方回应:我们没有放弃TensorFlow,未来与JAX并肩发展
![[kubernetes series] kubesphere is installed on kubernetes](/img/2b/eb39cf78b3bb9908b01f279e2f9958.png)
[kubernetes series] kubesphere is installed on kubernetes

线性代数1.1

Used on windows Bat file startup project

Two years ago, the United States was reluctant to sell chips, but now there are mountains of chips begging China for help
随机推荐
Activiti常见操作数据表关系
Comparison between applet framework and platform compilation
Amd RX 7000 Series graphics card product line exposure: two generations of core and process mix and match
L1-023 output gplt (20 points)
BasicVSR++: Improving Video Super-Resolutionwith Enhanced Propagation and Alignment
线性代数1.1
This monitoring system can monitor the turnover intention and fishing all, and the product page has 404 after the dispute appears
With excellent strength, wangchain technology, together with IBM and Huawei, has entered the annual contribution list of "super ledger"!
[real case] how to deal with the failure of message consumption?
Zephyr Learning note 2, Scheduling
【FreeRTOS】FreeRTOS學習筆記(7)— 手寫FreeRTOS雙向鏈錶/源碼分析
Implementation of ZABBIX agent active mode
2022-021ARTS:下半年開始
Label management of kubernetes cluster
弈柯莱生物冲刺科创板:年营收3.3亿 弘晖基金与淡马锡是股东
Computer connects raspberry pie remotely through putty
[Android reverse] function interception (use cache_flush system function to refresh CPU cache | refresh CPU cache disadvantages | recommended time for function interception)
[untitled] notice on holding "2022 traditional fermented food and modern brewing technology"
两年前美国芯片扭捏着不卖芯片,如今芯片堆积如山祈求中国帮忙
21 examples of strategic goals to promote the rapid development of your company