In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
I. Overview
Zabbix's own MySQL plug-in to monitor the mysql database, but it is too simple, for us dba, basically no effect, so we need to do more detailed monitoring, and percona has this detailed monitoring template and script, just to bring it over.
Percona official website: www.percona.com
Introduction to the composition of Percona
1. PHP script is used to collect data.
2. Shell script is used to call and collect information.
3. Zabbix configuration file
4. Zabbix template file
II. Installation and configuration
1. Download and install
Https://www.percona.com/downloads/percona-monitoring-plugins/LATEST/
Nagios and catcti are also supported
Wget https://www.percona.com/downloads/percona-monitoring-plugins/percona-monitoring-plugins-1.1.7/binary/redhat/6/x86_64/percona-zabbix-templates-1.1.7-2.noarch.rpm
Rpm-ivh percona-zabbix-templates-1.1.7-2.noarch.rpm
Yum install percona-zabbix-templates php php-mysql-y
Rpm-ql percona-zabbix-templates
/ var/lib/zabbix/percona
/ var/lib/zabbix/percona/scripts
/ var/lib/zabbix/percona/scripts/get_mysql_stats_wrapper.sh
/ var/lib/zabbix/percona/scripts/ss_get_mysql_stats.php
/ var/lib/zabbix/percona/templates
/ var/lib/zabbix/percona/templates/userparameter_percona_mysql.conf
/ var/lib/zabbix/percona/templates/zabbix_agent_template_percona_mysql_server_ht_2.0.9-sver1.1.7.xml is the MYSQL monitoring template
Copy the configuration file to the / etc/zabbix/zabbix_agentd.d/ directory
Cp / var/lib/zabbix/percona/templates/userparameter_percona_mysql.conf / etc/zabbix/zabbix_agentd.d/
Vim / var/lib/zabbix/percona/scripts/ss_get_mysql_stats.php
$mysql_user = 'root'
$mysql_pass =''
$mysql_port = 3306
$mysql_socket = NULL
$mysql_flags = 0
The test environment root password is empty, if the production environment will create a dedicated read-only account.
The configuration file needs to be changed and restarted.
/ etc/init.d/zabbix-agent restart
The test will return the test result.
Cd / var/lib/zabbix/percona/scripts/
. / get_mysql_stats_wrapper.sh gm
0
. / get_mysql_stats_wrapper.sh gw
20060
2. Import template
Import template Times error "invalid tag" / zabbix_export/date ":" YYYY-MM-DDThh:mm:ssZ "expected"
Solution.
Import zabbix_agent_template_percona_mysql_server_ht_2.0.9-sver1.1.7.xml into zabbix2.4 and then export. Then import the new export xml into 3.2 to resolve the problem.
Authority problem
Received value [rm: cannot delete "/ tmp/localhost-mysql_cacti_stats.txt": disallowed operation 0] is not suitable for value type [Numeric (float)]
Solution.
Cd / tmp
Chown-R zabbix.zabbix localhost-mysql_cacti_stats.txt
/ etc/init.d/zabbix-agent restart
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.