In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
What this article shares with you is an example analysis of the PROXYSQL monitoring sentence ON ZABBIX STEP ONE. The editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.
PROXYSQL is the key for applications to connect to MYSQL and FAILOVER MYSQL through PROXYSQL. So while monitoring MYSQL, you must also monitor PROXYSQL. If PROXYSQL goes down, the MYSQL cluster will be accessible.
Parameters related to monitoring
1 Monitoring the connection between PROXYSQL and each server there is a table in PROXYSQL that monitors the connection between PROXYSQL and MYSQL, through this status to obtain the connection
The time of the network connection between the PROXYSQL and the MYSQL, the time value is us
How to get parameters for ZABBIX (filter useless characters through GREP, or other SED, AWK, etc.) Please collect them every 3 seconds and 5 seconds. Each SERVER needs such a statement.
Mysql - uadmin - padmin h 127.0.0.1 P6032 e "select
Hostname,max (time_start_us), connect_success_time_us from mysql_server_connect_log where
Hostname = '10.50.132.185' "
2 monitor the feedback time of statements between PROXYSQL and MYSQL, including the running time of MYSQL how to get data from ZABBIX (filter useless characters by GREP,AWK,SED, etc.) Please run every 2 5 seconds to get the execution change status of each statement in MYSQL.
Time ms to get the DELETE of a single statement
Mysql - uadmin - padmin h 127.0.0.1 P6032 e "SELECT Command,Total_Time_us/1000 /
Total_cnt as Per_delete_ms FROM stats_mysql_commands_counters WHERE Total_cnt and command = 'DELETE' "
Get the INSERT time ms of a single statement
Mysql - uadmin - padmin h 127.0.0.1 P6032 e "SELECT Command,Total_Time_us/1000 /
Total_cnt as Per_delete_ms FROM stats_mysql_commands_counters WHERE Total_cnt and command = 'INSERT' "
Get the UPDATE time ms of a single statement
Mysql - uadmin-padmin h 127.0.0.1 P6032 e "SELECT Command,Total_Time_us/1000 /
Total_cnt as Per_delete_ms FROM stats_mysql_commands_counters WHERE Total_cnt and command = 'UPDATE' "
Get the SELETE time ms of a single statement
Mysql u admin padmin h 127.0.0.1 P6032 e "SELECT Command,Total_Time_us/1000 /
Total_cnt as Per_delete_ms FROM stats_mysql_commands_counters WHERE Total_cnt and command = 'SELECT' "
(3) the master node information obtained by the current PROXYSQL, and the master node switching information (alarm is required)
PROXYSQL will automatically judge the switch of MYSQL MGR, and the following statement shows
Mysql u admin padmin h 127.0.0.1 P6032 e "select srv_host,status,bytes_data_sent/queries
As Per_queries_5S from stats_mysql_connection_pool where hostgroup = 1 "hostgroup = 1"
If the name of SRV_HOST is switched, it means that MGR has switched the master node. There must be something wrong with it, so we need to call the police. We need to check why the switch is done, and whether any node has proposed a cluster. And PER_QUERIES_5S can monitor every 5 seconds to check the average BYTES of each QUESTIONS BYTES unit passing through PROXYSQL.
Mysql u admin padmin h 127.0.0.1 P6032 e "select srv_host,status,bytes_data_sent/queries
As Per_queries_bytes from stats_mysql_connection_pool where hostgroup = 1 "
4 get the status of the current PROXYSQL connection, how many ACTIVE connections are currently connected to PROXYSQLmysql u admin padmin h 127.0.0.1 P6032 e "select * from stats.stats_mysql_global where"
Variable_name = 'Client_Connections_connected' girls'
Rejected connections after the current system starts
Mysql u admin padmin h 127.0.0.1 P6032 e "select * from stats.stats_mysql_global where
Variable_name = 'Client_Connections_aborted' girls'
Number of connections to the MYSQL from the current system PROXYSQL
Mysql u admin padmin h 127.0.0.1 P6032 e "select * from stats.stats_mysql_global where
Variable_name = 'Server_Connections_connected' girls'
The above is the example analysis of the PROXYSQL monitoring statement ON ZABBIX STEP ONE. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.