当前位置:网站首页>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页面 —> 配置 —> 主机 —> 创建主机 —> 模板 —> 创建
边栏推荐
- Zephyr learning notes 1, threads
- 深入浅出:了解时序数据库 InfluxDB
- Directory of tornado
- BibTex中参考文献种类
- Pangu open source: multi support and promotion, the wave of chip industry
- 21个战略性目标实例,推动你的公司快速发展
- Unity 从Inspector界面打开资源管理器选择并记录文件路径
- Google's official response: we have not given up tensorflow and will develop side by side with Jax in the future
- [network security] what is emergency response? What indicators should you pay attention to in emergency response?
- Flask 常用组件
猜你喜欢
This article is enough for learning advanced mysql
JVM中堆概念
BUUCTF(4)
Boosting the Performance of Video Compression Artifact Reduction with Reference Frame Proposals and
Zephyr study notes 2, scheduling
Recursive Fusion and Deformable Spatiotemporal Attention for Video Compression Artifact Reduction
[kubernetes series] kubesphere is installed on kubernetes
Write a thread pool by hand, and take you to learn the implementation principle of ThreadPoolExecutor thread pool
BasicVSR++: Improving Video Super-Resolutionwith Enhanced Propagation and Alignment
【森城市】GIS数据漫谈(一)
随机推荐
提升复杂场景三维重建精度 | 基于PaddleSeg分割无人机遥感影像
[freertos] freertos Learning notes (7) - written freertos bidirectionnel Link LIST / source analysis
【Kubernetes系列】Kubernetes 上安装 KubeSphere
Zhanrui tankbang | jointly build, cooperate and win-win zhanrui core ecology
L1-023 output gplt (20 points)
Is l1-029 too fat (5 points)
BUUCTF(3)
[Flink] temporal semantics and watermark
window上用.bat文件启动项目
Used on windows Bat file startup project
人生规划(Flag)
Unity 从Inspector界面打开资源管理器选择并记录文件路径
Blue Bridge Cup Quick sort (code completion)
Zephyr 学习笔记1,threads
Flask 常用组件
2022-021ARTS:下半年开始
Detailed introduction to the big changes of Xcode 14
Project 1 household accounting software (goal + demand description + code explanation + basic fund and revenue and expenditure details record + realization of keyboard access)
博客停更声明
Linear algebra 1.1