当前位置:网站首页>ZABBIX agent2 installation
ZABBIX agent2 installation
2022-07-05 12:19:00 【Xiaobo】
Zabbix Agent2 Introduce
Zabbix 5.0 Version introduces the use go Language rewrites Agent2, It's also 5.0 Version new features ,Agent2 Has the following characteristics :
The completed plug-in framework supports , Scalable services and application monitoring
Support flexible collection cycle scheduling
More efficient data acquisition and transmission
Can completely replace the existing agent
…..
There are many features , It is recommended to use . Due to the use go Language writing , Compilation and installation are different from previous versions .Agent2 Default 10050 port , And Zabbix Agent Same port , Without modifying the port , The same machine cannot be started at the same time Zabbix Agent And Zabbix Agent2.
install
You can use yum Or compile and install , For novice , It is recommended to use yum install .
yum install
Good configuration yum Source , Use the following command to install Zabbix Agent2
rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
yum clean all
yum install zabbix-agent2 -yThe default profile is
/etc/zabbix/zabbix_agent2.confThe default binary file is
/usr/sbin/zabbix_agent2Start with the following command Agent2 And configure boot up
systemctl enable --now zabbix-agent2Compilation and installation
install gcc And other basic compilation environments , Due to the use go To write , So you need to configure go Compile environment , Download and configure go Language compiling environment
cd /opt
wget https://dl.google.com/go/go1.14.3.linux-amd64.tar.gz
tar zxvf go1.14.3.linux-amd64.tar.gz -C /usr/local/
echo "export PATH=$PATH:/opt/go/bin" >>/etc/profile
source /etc/profile
go envThe final display is as follows , indicate go Locale configuration succeeded .
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/root/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build821720893=/tmp/go-build -gno-record-gcc-switches"Turn on go mod, Because the compilation process requires online downloading of dependent packages , To configure go mod agent
go env -w GO111MODULE=on
go env -w GOPROXY=https://goproxy.cn,directdownload zabbix 5.0 Source code
cd /opt
wget https://cdn.zabbix.com/zabbix/sources/stable/5.0/zabbix-5.0.0.tar.gz
tar zxvf zabbix-5.0.0.tar.gz
cd zabbix-5.0.0If you just want to compile agent2, Direct addition -enable-agent2 Parameters can be
./configure --prefix=/usr/local/zabbix -enable-agent2
make
make install You must pay attention to errors in the compilation process , You need to download dependent packages online , Wait patiently for the installation to complete .
Default profile
/usr/local/zabbix/etc/zabbix_agent2.confBinary program
/usr/local/zabbix/sbin/zabbix_agent2To configure systemd Startup file
vi /lib/systemd/system/zabbix-agent2.serviceThe contents are as follows
[Unit]
Description=Zabbix Agent 2
After=syslog.target
After=network.target
[Service]
Environment="CONFFILE=/usr/local/zabbix/etc/zabbix_agent2.conf"
EnvironmentFile=-/etc/sysconfig/zabbix-agent2
Type=simple
Restart=on-failure
PIDFile=/tmp/zabbix_agent2.pid
KillMode=control-group
ExecStart=/usr/local/zabbix/sbin/zabbix_agent2 -c $CONFFILE
ExecStop=/bin/kill -SIGTERM $MAINPID
RestartSec=10s
User=zabbix
Group=zabbix
[Install]
WantedBy=multi-user.targetConfigure startup and set startup
systemctl enable --now zabbix-agent2Agent2 No component dependency , You can directly copy the compiled binary files and configuration files and run them on other hosts .
边栏推荐
- Halcon 模板匹配实战代码(一)
- Differences between IPv6 and IPv4 three departments including the office of network information technology promote IPv6 scale deployment
- Master the new features of fluent 2.10
- [cloud native | kubernetes] actual battle of ingress case (13)
- How can beginners learn flutter efficiently?
- abap查表程序
- What is digital existence? Digital transformation starts with digital existence
- Which domestic cloud management platform manufacturer is good in 2022? Why?
- 报错ModuleNotFoundError: No module named ‘cv2.aruco‘
- Sentinel sentinel mechanism of master automatic election in redis master-slave
猜你喜欢

Use and install RkNN toolkit Lite2 on itop-3568 development board NPU

Principle of persistence mechanism of redis

Multi table operation - sub query

Redis master-slave mode

Reading notes of growth hacker

Liunx prohibit Ping explain the different usage of traceroute
![[cloud native | kubernetes] actual battle of ingress case (13)](/img/1a/9404f6dcedd15827fa45f8f6f4c093.png)
[cloud native | kubernetes] actual battle of ingress case (13)

Simple production of wechat applet cloud development authorization login

Redis cluster (master-slave) brain crack and solution

Matlab boundarymask function (find the boundary of the divided area)
随机推荐
Open3d European clustering
Course design of compilation principle --- formula calculator (a simple calculator with interface developed based on QT)
Take you two minutes to quickly master the route and navigation of flutter
July Huaqing learning-1
Redirection of redis cluster
Four operations and derivative operations of MATLAB polynomials
MySQL regular expression
只是巧合?苹果 iOS16 的神秘技术竟然与中国企业 5 年前产品一致!
Codeforces Round #804 (Div. 2)
ACID事务理论
abap查表程序
Complete activity switching according to sliding
Matlab label2idx function (convert the label matrix into a cell array with linear index)
A new WiFi option for smart home -- the application of simplewifi in wireless smart home
[pytorch modifies the pre training model: there is little difference between the measured loading pre training model and the random initialization of the model]
Conversion du format de données GPS [facile à comprendre]
嵌入式软件架构设计-消息交互
Matlab boundarymask function (find the boundary of the divided area)
Swift - add navigation bar
Swift - enables textview to be highly adaptive