当前位置:网站首页>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
边栏推荐
- 跟着Vam一起学习Typescript(第一期)
- Talk about some good ways to participate in the project
- 让UPS“印象派用户”重新认识可靠性
- 主链系统发展解析
- How to convert XML to HL7
- Example description and case of ansible playbook automated cluster server management
- 04. Tencent cloud IOT device side learning - network connection and device authentication
- ClassNotFoundException v/s NoClassDefFoundError
- 集体突破之后,中国公有云的下一步落在哪里?
- Robot toolbox matlab robotics toolbox
猜你喜欢

Daily algorithm & interview questions, 28 days of special training in large factories - the 15th day (string)
![[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

Why do you develop middleware when you are young? "You can choose your own way"
随机推荐
Best practices for H5 page adaptation and wechat default font size
Research on clock synchronization performance monitoring system based on 1588v2 Technology
[play with Tencent cloud] check 9 popular Tencent cloud products
集体突破之后,中国公有云的下一步落在哪里?
In those years, I insisted on learning the motivation of programming
Go path customized project path package dependency
This time, talk about the dry goods of industrial Internet | TVP technology closed door meeting
zblog系统实现前台调用当天发布文章数量的教程
Future banks need to think about today's structure with tomorrow's thinking
Tencent released "warehouse express" and issued "ID card" for each commodity!
Scuffle on China's low code development platform -- make it clear that low code
[security] graphical CSRF injection of Web Security (II)
Ramda's little-known side
Snapshot management for elastic cloud enterprise
Learn typescript with VAM (phase 1)
中金证券靠谱吗?是否合法?开股票账户安全吗?
How to convert XML to HL7
2021-04-02: given a square or rectangular matrix, zigzag printing can be realized.
IBM:以现代化架构支撑AI与多云时代的企业数字化重塑
跟着Vam一起学习Typescript(第一期)