X-Git-Url: https://arthur.barton.de/gitweb/?a=blobdiff_plain;f=charts.d%2Fmysql.chart.sh;h=30ad74ea31e159aa8dcb9e8645f1719a39b32feb;hb=7ee587c5d77f3b7cb7f63e12ca1fc9435471d95c;hp=fe07658eaac2f051e9f732f91e50326e3f6c5af3;hpb=167aa7a2cf5fc455cbbc0cab3dba80c251507c8e;p=netdata.git diff --git a/charts.d/mysql.chart.sh b/charts.d/mysql.chart.sh index fe07658e..30ad74ea 100755 --- a/charts.d/mysql.chart.sh +++ b/charts.d/mysql.chart.sh @@ -17,7 +17,8 @@ mysql_get() { local oIFS="${IFS}" mysql_data=() IFS=$'\t'$'\n' - 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)" )) + #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)" )) + 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]" )) IFS="${oIFS}" [ "${#arr[@]}" -lt 3 ] && return 1