Zabbix的客户端安装教程
生活随笔
收集整理的這篇文章主要介紹了
Zabbix的客户端安装教程
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
Zabbix的客戶端安裝教程
- 一、Zabbix客戶端及其它相關介紹
- 二、Zabbix客戶端安裝步驟
- 三、測試安裝結果
一、Zabbix客戶端及其它相關介紹
1.zabbix是一個基于WEB界面的提供分布式系統監視以及網絡監視功能的企業級的開源解決方案
2.zabbix由2部分構成,zabbix server與可選組件zabbix agent。
3.Zabbix_Agent:zabbix-agent為客戶端軟件,用于采集各監控項目的數據,并把采集的數據傳輸給zabbix-proxy或zabbix-server。
4.zabbix server:可以通過SNMP,zabbix agent,ping,端口監視等方法提供對遠程服務器/網絡狀態的監視,數據收集等功能,它可以運行在Linux,Solaris,HP-UX,AIX,Free BSD,Open BSD,OS X等平臺上。
二、Zabbix客戶端安裝步驟
1.開通10050端口用于和Zabbix-server通信
[root@control ~]# firewall-cmd --permanent --add-port=10050/tcp success [root@control ~]# firewall-cmd --reload success2.SELINUX關閉
[root@control ~]# setenforce 0 [root@control ~]# getenforce Permissive [root@control ~]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config [root@control ~]# grep SELINUX /etc/selinux/config # SELINUX= can take one of these three values: SELINUX=disabled # SELINUXTYPE= can take one of these three values: SELINUXTYPE=targeted3.安裝Zabbix-agent
[root@control ~]# yum -y install https://repo.huaweicloud.com/zabbix/zabbix/5.0/rhel/8/x86_64/zabbix-agent2-5.0.9-1.el8.x86_64.rpm Updating Subscription Management repositories. Unable to read consumer identity This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. AppStream 0.0 B/s | 0 B 00:00 BaseOS 0.0 B/s | 0 B 00:00 Failed to synchronize cache for repo 'AppStream', ignoring this repo. Failed to synchronize cache for repo 'BaseOS', ignoring this repo. Last metadata expiration check: 0:57:08 ago on Thu 06 May 2021 12:01:05 AM CST. zabbix-agent2-5.0.9-1.el8.x86_64.rpm 2.7 MB/s | 5.4 MB 00:02 Dependencies resolved. ==================================================================================================================================================================Package Arch Version Repository Size ================================================================================================================================================================== Installing:zabbix-agent2 x86_64 5.0.9-1.el8 @commandline 5.4 MTransaction Summary ================================================================================================================================================================== Install 1 PackageTotal size: 5.4 M Installed size: 18 M Downloading Packages: Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transactionPreparing : 1/1 Running scriptlet: zabbix-agent2-5.0.9-1.el8.x86_64 1/1 Installing : zabbix-agent2-5.0.9-1.el8.x86_64 1/1 Running scriptlet: zabbix-agent2-5.0.9-1.el8.x86_64 1/1 Verifying : zabbix-agent2-5.0.9-1.el8.x86_64 1/1 Installed products updated.Installed:zabbix-agent2-5.0.9-1.el8.x86_64 Complete!4.安裝zabbix-sender
[root@control ~]# yum -y install https://repo.huaweicloud.com/zabbix/zabbix/5.0/rhel/8/x86_64/zabbix-sender-5.0.9-1.el8.x86_64.rpm Updating Subscription Management repositories. Unable to read consumer identity This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. AppStream 0.0 B/s | 0 B 00:00 BaseOS 0.0 B/s | 0 B 00:00 Failed to synchronize cache for repo 'AppStream', ignoring this repo. Failed to synchronize cache for repo 'BaseOS', ignoring this repo. Last metadata expiration check: 0:58:44 ago on Thu 06 May 2021 12:01:05 AM CST. zabbix-sender-5.0.9-1.el8.x86_64.rpm 281 kB/s | 364 kB 00:01 Dependencies resolved. ==================================================================================================================================================================Package Arch Version Repository Size ================================================================================================================================================================== Installing:zabbix-sender x86_64 5.0.9-1.el8 @commandline 364 kTransaction Summary ================================================================================================================================================================== Install 1 PackageTotal size: 364 k Installed size: 1.6 M Downloading Packages: Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transactionPreparing : 1/1 Installing : zabbix-sender-5.0.9-1.el8.x86_64 1/1 Running scriptlet: zabbix-sender-5.0.9-1.el8.x86_64 1/1 Verifying : zabbix-sender-5.0.9-1.el8.x86_64 1/1 Installed products updated.Installed:zabbix-sender-5.0.9-1.el8.x86_64 Complete!5.配置/etc/zabbix/zabbix.agentd.conf
Server=192.168.200.129### Option: ListenPort # Agent will listen on this port for connections from the server. # # Mandatory: no # Range: 1024-32767 # Default: # ListenPort=10050### Option: ListenIP # List of comma delimited IP addresses that the agent should listen on. # First IP address is sent to Zabbix server if connecting to it to retrieve list of active checks. # # Mandatory: no # Default: # ListenIP=0.0.0.0### Option: StatusPort # Agent will listen on this port for HTTP status requests. # # Mandatory: no # Range: 1024-32767 # Default: # StatusPort=##### Active checks related### Option: ServerActive # List of comma delimited IP:port (or DNS name:port) pairs of Zabbix servers and Zabbix proxies for active checks. # If port is not specified, default port is used. # IPv6 addresses must be enclosed in square brackets if port for that host is specified. # If port is not specified, square brackets for IPv6 addresses are optional. # If this parameter is not specified, active checks are disabled. # Example: ServerActive=127.0.0.1:20051,zabbix.domain,[::1]:30051,::1,[12fc::1] # # Mandatory: no # Default: # ServerActive=ServerActive=192.168.200.129### Option: Hostname # Unique, case sensitive hostname. # Required for active checks and must match hostname as configured on the server. # Value is acquired from HostnameItem if undefined. # # Mandatory: no # Default: # Hostname=Hostname=192.168.200.1296.啟動服務
[root@control ~]# systemctl enable --now zabbix-agent2.service Created symlink /etc/systemd/system/multi-user.target.wants/zabbix-agent2.service → /usr/lib/systemd/system/zabbix-agent2.service.三、測試安裝結果
1.服務端添加被監控主機
總結
以上是生活随笔為你收集整理的Zabbix的客户端安装教程的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Linux下的awk用法详解
- 下一篇: Linux基础之shell变量