当前位置:网站首页>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
边栏推荐
- One article combs multi task learning (mmoe/ple/dupn/essm, etc.)
- [web] what happens after entering the URL from the address bar?
- Construction scheme of campus network clock system (standardized examination room)
- [version upgrade] Tencent cloud firewall version 2.1.0 was officially released!
- How to convert XML to HL7
- 未来银行需要用明天的思维,来思考今天架构
- Live broadcast Preview - on April 1, I made an appointment with you to explore tcapulusdb with Tencent cloud
- 重新定义存储架构,华为用了不止5颗“芯”
- zblog判断某个插件是否安装启用的内置函数代码
- zblog系统实现前台调用当天发布文章数量的教程
猜你喜欢
![[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)

MySQL learning -- table structure of SQL test questions

Daily algorithm & interview questions, 28 days of special training in large factories - the 15th day (string)

Why do you develop middleware when you are young? "You can choose your own way"
随机推荐
Let ups "Impressionist users" re understand reliability
Regular expression learning artifact!
2021-04-02: given a square or rectangular matrix, zigzag printing can be realized.
One article combs multi task learning (mmoe/ple/dupn/essm, etc.)
[security] graphical CSRF injection of Web Security (II)
Radiology: contralateral preoperative resting state MRI functional network integration is related to the surgical results of temporal lobe epilepsy
Game business DDoS attack and defense confrontation case sharing
Go path customized project path package dependency
Automatically refresh CDN cache in real time based on cos log
实现TypeScript运行时类型检查
Can you remember the code of a programming boss? Can you hit it out without Baidu?
[tke] enable CPU static management strategy
Zblog determines whether a plug-in installs the enabled built-in function code
Introduction to koa (II) building the koa program
A comprehensive understanding of fiber to home FTTH and optical splitter
GB gb28181 video cascading intelligent analysis platform easygbs broadcast video console error 401
Yiwen teaches you to understand the stack operation in go
Introduction to koa (IV) koa operation database
Sigai intelligent container damage identification products are deployed in Rizhao Port and Yingkou Port
Analysis and introduction of NFT meta universe source code construction