@cryptotaxi247 / netdata-1 / commits / 9f7d9bf40

fixed fom mysql not reading Handler_X values in older systems

Costa Tsaousis (ktsaou) committed Jul 8, 2016 at 17:13 UTC 9f7d9bf40e61ca5d5acb872221a82576dc76e7e3
1 file changed +2 -1
charts.d/mysql.chart.sh
+2 -1
@@ -18,7 +18,8 @@ mysql_get() {
18 mysql_data=()
19 IFS=$'\t'$'\n'
20 #arr=($("${@}" -e "SHOW GLOBAL STATUS WHERE value REGEXP '^[0-9]';" | egrep "^(Bytes|Slow_|Que|Handl|Table|Selec|Sort_|Creat|Conne|Abort|Binlo|Threa|Innod|Qcach|Key_|Open)" ))
21 - arr=($("${@}" -N -e "SHOW GLOBAL STATUS;" | egrep "^(Bytes|Slow_|Que|Handl|Table|Selec|Sort_|Creat|Conne|Abort|Binlo|Threa|Innod|Qcach|Key_|Open)[^ ]+\s[0-9]" ))
21 + #arr=($("${@}" -N -e "SHOW GLOBAL STATUS;" | egrep "^(Bytes|Slow_|Que|Handl|Table|Selec|Sort_|Creat|Conne|Abort|Binlo|Threa|Innod|Qcach|Key_|Open)[^ ]+\s[0-9]" ))
22 + arr=($("${@}" -N -e "SHOW GLOBAL STATUS;" | egrep "^(Bytes|Slow_|Que|Handl|Table|Selec|Sort_|Creat|Conne|Abort|Binlo|Threa|Innod|Qcach|Key_|Open)[^[:space:]]+[[:space:]]+[0-9]+" ))
23 IFS="${oIFS}"
24
25 [ "${#arr[@]}" -lt 3 ] && return 1