In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
The following brings you about the use of zabbix2.4.5 to monitor mysql database content, I believe you must have read similar articles. What's the difference between what we bring to everyone? Let's take a look at the body. I'm sure you'll get something from using zabbix2.4.5 to monitor the mysql database.
I. relevant instructions
Zabbix 2.4.5 is used on the production line to monitor all business and system networks. Of course, it is also necessary to monitor the information related to the mysql database. Zabbix's own mysql monitoring template can monitor mysql. This paper is passed under zabbix 2.4.5. Please try other versions on your own.
2. Configure mysql to be monitored
1. First authorize zabbixagent to connect to the database:
Log in to mysql as mysql roott
$mysql-uroot-p123456-e "GRANT USAGE ON *. * TO 'zabbixagent'@'localhost' IDENTIFIED BY' zbbixagent'"; $GRANT USAGE,PROCESS,SUPER,REPLICATION CLIENT,REPLICATION SLAVE ON *. * TO 'zabbixagent'@'localhost' IDENTIFIED BY' zabbixagent'; $flush privileges
Or:
# mysql-uroot-p-e "GRANT USAGE ON *. * TO 'zabbixagent'@'localhost' IDENTIFIED BY' zabbixagent'"
2. Add mysql configuration file
Vim / etc/zabbix/.my.cnf
# Zabbix Agent[mysql] host=localhostuser=zabbixagentpassword=zabbixagentsocket=/data1/mysqldb/mysql/ mysql.sock[mysqladmin] host=localhostuser=zabbixagentpassword=zabbixagentsocket=/data1/mysqldb/mysql/mysql.sock
Note: where is the socket? please check the path in cat / etc/my.cnf before you modify it.
III. Modify / etc/zabbix/zabbix_agent.conf
The modifications are as follows:
UnsafeUserParameters=1
Include=/usr/local/zabbix/etc/zabbix_agentd.conf.d/
4. Modify mysql template parameters
Mysql template is included in zabbix-2.4.4, which is placed in / etc/zabbix/zabbix_agentd.d/userparameter_mysql.conf by default
Need to replace HOME=/var/lib/zabbix with: HOME=/etc/zabbix
., $s /\ / var\ / lib/\ / etc/g (all vim command line modes are replaced)
Restart zabbix_agent
# service zabbix_agent restart
If tail-f / var/log/zabbix/zabbix_server.log on zabbix CVM cannot be plotted or Not supported appears.
27659 changed 20150428 error reason for "ydnwy-01:mysql.status [Uptime]" changed: Received value [ERROR 2002 (HY000):
Can't connect to local MySQL server through socket'/ data1/mysqldb/mysql/mysql.sock' (13)]
Is not suitable for value type [Numeric (unsigned)] and data type [Decimal]
A similar error indicates that there is a problem with mysql.sock access on the monitor side. Please check the permissions or
# ln-s / data1/mysqldb/mysql/mysql.sock / var/lib/mysql/mysql.sock
Do you think you want to use zabbix2.4.5 to monitor mysql database above? If you want to know more about it, you can continue to follow our industry information section.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.