当前位置:网站首页>Zabix5.0-0 - agent2 monitoring MariaDB database (Linux based)
Zabix5.0-0 - agent2 monitoring MariaDB database (Linux based)
2022-06-24 17:15:00 【TX-QGS】
At least two virtual machines are required for testing
A server ( Monitoring terminal )jk
A client ( By monitoring the ) Necessary conditions and installation agent2
Deploy zabbix-agent2 And verification , Collect data , Detect other virtual machines ( The server ), Install... On other virtual machines azbbix-agent2(go Language )
Turn off firewall
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config systemctl disable --now firewalld
yum install ntpdate -y
Synchronization time , And time zone
ntpdate -u ntp.huaweicloud.com or ( A choice , Don't change , Unknown errors may occur when changing ~) ntpdate -u ntp.aliyun.com
Check the time
date
Time zone unification
mv /etc/localtime{,.bak}
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtimeDeploy azbbix-agent2(go Language )
Operate again , install zabbix rpm Source ( Use Huawei cloud zabbix Source or alicloud zabbix Source )
# With Huawei cloud zabbix Source rpm -Uvh https://mirrors.huaweicloud.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.huaweicloud.com/zabbix#' /etc/yum.repos.d/zabbix.repo ( Choose one of the two sources , Don't change , Unknown errors may occur when changing ~) or # Alibaba cloud is used zabbix Source 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
install azbbix-agent2
yum-y install zabbix-agent2
When prompted, enter y You can enter.
ls -l /etc/zabbix/zabbix_agent2.conf
Boot up zabbix-agent2
systemctl enable --now zabbix-agent2
yum -y install net-tools
Check the port
netstat -tnlp|grep zabbix
View validation zabbix-agent2.service file
ls /lib/systemd/system/zabbix-agent2.service
If you need details, you can also cat see
Configure and modify the file
grep -Ev '^#|^$' /etc/zabbix/zabbix_agent2.conf
cat /var/run/zabbix/zabbix_agent2.pid ( Different sources , There may be some changes ) ps -ef|grep zabbix
vi /etc/zabbix/zabbix_agent2.conf
:wq Exit save
Check and see what has been modified
grep -Ev '^#|^$' /etc/zabbix/zabbix_agent2.conf
You must change everything ~ restart zabbix_agent2
systemctl restart zabbix-agent2
A server ( Monitoring terminal )jk operation
The return value is 1, explain ping through Mysql database
zabbix_get -s IP -p 10050 -k mysql.ping["tcp://IP:3306"," user name "," password "]
The database is configured according to the above link
Mariadb Database installation steps link :https://bbs.huaweicloud.com/blogs/244673 ( The database is already installed. This step can be omitted ~!! Remember the user name and password . It's very important ~)
go back to web End http://EIP/zabbix/zabbix.php?action=dashboard.view ( take EIP Change it to your own IP Address )
To configure -》 Templates -》agent2
For database security ~~
mysql -u root -p
# Change Password set password for [email protected] = password(' Customize '); # Open remote connection use mysql; update user set user.Host='%' where user.User='root'; create user 'qgs'@'%' identified by 'qgs111'; #create user ' user name '@'%' identified by ' password '; grant select,process,super on *.* to 'qgs'@'%' identified by 'qgs111'; #grant select,process,super on *.* to ' user name '@'%' identified by ' password '; Allow all ip Connect ( Use wildcards % Express ), Only specified IP The address link will % Remove it flush privileges; quit
Just the user name , password ,IP Just have the right address
The operation of monitoring multiple databases is as follows
Select Update wait
边栏推荐
- 让UPS“印象派用户”重新认识可靠性
- ClassNotFoundException v/s NoClassDefFoundError
- Low education without food? As an old Android rookie in the past six years, I was the most difficult one
- Factory mode
- Cloud native monitoring practice (2) monitoring and collection of components outside the TKE cluster
- 网站SEO排名越做越差是什么原因造成的?
- Today, Tencent safety and SAIC Group officially announced!
- Let ups "Impressionist users" re understand reliability
- Issue 003 how to detect whether a sticky positioned element is in a pinned state
- Edit distance (linear dp+ violence matching)
猜你喜欢

MySQL learning -- table structure of SQL test questions

Why do you develop middleware when you are young? "You can choose your own way"
![[leetcode108] convert an ordered array into a binary search tree (medium order traversal)](/img/e1/0fac59a531040d74fd7531e2840eb5.jpg)
[leetcode108] convert an ordered array into a binary search tree (medium order traversal)

Daily algorithm & interview questions, 28 days of special training in large factories - the 15th day (string)
随机推荐
What securities dealers recommend? Is it safe to open an account online now?
Implement typescript runtime type checking
[log service CLS] Tencent cloud game battle engine mgobe accesses CLS
How to learn go language happily? Let's go!
How important is it to document the project? I was chosen by the top 100 up leaders and stood up again
Go path customized project path package dependency
Game business DDoS attack and defense confrontation case sharing
The TKE cluster node reports an error when executing kubectl
Sigai intelligent container damage identification products are deployed in Rizhao Port and Yingkou Port
How to compile and debug go runtime source code
[playing with Tencent cloud] a solution to the impassability of cross-border access to foreign websites using Tencent cloud CVM
Cloud native monitoring practice (2) monitoring and collection of components outside the TKE cluster
Coding's first closed door meeting on financial technology exchange was successfully held
Complete the log service CLS questionnaire in 1 minute and receive the Tencent cloud 30 yuan threshold free voucher ~
Bypass kernel function pointer integrity check
How to convert XML to HL7
Go kit microservice integrates Promtheus to solve monitoring alarm problems
What is the reason for the worse website SEO ranking?
A comprehensive understanding of fiber to home FTTH and optical splitter
H265/webvr video web page without plug-in player easyplayer Solution to the problem of cumulative delay of FLV video played by JS