时间:2021-07-01 10:21:17 帮助过:13人阅读
1、下载及安装 https://www.percona.com/downloads/percona-monitoring-plugins/LATEST/ #同时也支持Nagios和catcti
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 2、将模板配置文件拷贝到/etc/zabbix/zabbix_agentd.d/目录: cp /var/lib/zabbix/percona/templates/userparameter_percona_mysql.conf /etc/zabbix/zabbix_agentd.d/ vi /var/lib/zabbix/percona/scripts/ss_get_mysql_stats.php
$mysql_user = ‘root‘; $mysql_pass = ‘‘; $mysql_port = 3306; $mysql_socket = NULL; $mysql_flags = 0; 注:测试环境root密码为空,如果生产环境会创建专门只读账号。 需要改配置文件需要重启
systemctl restart zabbix-agent 进行测试会返回测试结果 cd /var/lib/zabbix/percona/scripts/ ./get_mysql_stats_wrapper.sh gm 0 ./get_mysql_stats_wrapper.sh gw 20060
导入的时候会报错:
标签无效 "/zabbix_export/date": "YYYY-MM-DDThh:mm:ssZ" 预计。
改好的文件:https://pan.baidu.com/s/1c3QPXde 密码:291e
zabbix监控Mariadb数据库
标签:system bsp download 返回 color blog user php root密码