当前位置:网站首页>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 -y
The default profile is
/etc/zabbix/zabbix_agent2.conf
The default binary file is
/usr/sbin/zabbix_agent2
Start with the following command Agent2 And configure boot up
systemctl enable --now zabbix-agent2
Compilation 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 env
The 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,direct
download 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.0
If 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.conf
Binary program
/usr/local/zabbix/sbin/zabbix_agent2
To configure systemd Startup file
vi /lib/systemd/system/zabbix-agent2.service
The 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.target
Configure startup and set startup
systemctl enable --now zabbix-agent2
Agent2 No component dependency , You can directly copy the compiled binary files and configuration files and run them on other hosts .
边栏推荐
- MySQL constraints
- Correct opening method of redis distributed lock
- byte2String、string2Byte
- Four operations and derivative operations of MATLAB polynomials
- MySQL transaction
- MySQL log module of InnoDB engine
- Seven ways to achieve vertical centering
- Master the new features of fluent 2.10
- Course design of compilation principle --- formula calculator (a simple calculator with interface developed based on QT)
- Use and install RkNN toolkit Lite2 on itop-3568 development board NPU
猜你喜欢
Learn the memory management of JVM 02 - memory allocation of JVM
MySQL index - extended data
Embedded software architecture design - message interaction
16 channel water lamp experiment based on Proteus (assembly language)
Master the new features of fluent 2.10
What is digital existence? Digital transformation starts with digital existence
Matlab boundarymask function (find the boundary of the divided area)
你做自动化测试为什么总是失败?
Thoughts and suggestions on the construction of intelligent management and control system platform for safe production in petrochemical enterprises
嵌入式软件架构设计-消息交互
随机推荐
Redis master-slave mode
codeforces每日5题(均1700)-第五天
Matlab struct function (structure array)
Multi table operation - sub query
Course design of compilation principle --- formula calculator (a simple calculator with interface developed based on QT)
Multi table operation - Auto Association query
How can beginners learn flutter efficiently?
What is digital existence? Digital transformation starts with digital existence
A new WiFi option for smart home -- the application of simplewifi in wireless smart home
HiEngine:可媲美本地的云原生内存数据库引擎
Codeworks 5 questions per day (1700 average) - day 5
Just a coincidence? The mysterious technology of apple ios16 is actually the same as that of Chinese enterprises five years ago!
MySQL log module of InnoDB engine
[HDU 2096] 小明A+B
一类恒等式的应用(范德蒙德卷积与超几何函数)
Learn memory management of JVM 01 - first memory
Get all stock data of big a
Mmclassification training custom data
mmclassification 训练自定义数据
查看rancher中debug端口信息,并做IDEA Remote Jvm Debug