Mysql 监控5

2022-06-30 00:18:21 浏览数 (1)

再试试,就一切正常了

代码语言:javascript复制
[root@mysql-server ~]# sudo -u zabbix -H /var/lib/zabbix/percona/scripts/get_mysql_stats_wrapper.sh running-slave 
1
[root@mysql-server ~]# su - zabbix 
[zabbix@mysql-server ~]$ /var/lib/zabbix/percona/scripts/get_mysql_stats_wrapper.sh running-slave
1
[zabbix@mysql-server ~]$ 

然后重启 zabbix-agent ,只有重启,zabbix-agent 才能读到变化后的配置

代码语言:javascript复制
[root@mysql-server ~]# /etc/init.d/zabbix-agent  restart 
Shutting down Zabbix agent:                                [  OK  ]
Starting Zabbix agent:                                     [  OK  ]
[root@mysql-server ~]# 

连接测试

zabbix-server 测试一下连接

代码语言:javascript复制
[root@zabbix-server ~]# zabbix_get -s mysql-server -p 10050 -k "MySQL.running-slave" 
1
[root@zabbix-server ~]# zabbix_get -s mysql-server -p 10050 -k "MySQL.Threads-connected" 
1
[root@zabbix-server ~]# zabbix_get -s mysql-server -p 10050 -k "MySQL.max-connections" 
2048
[root@zabbix-server ~]# 

0 人点赞