]> arthur.barton.de Git - netdata.git/commitdiff
fix issue when dealing with MySQL
authorpaulfantom <paulfantom@gmail.com>
Wed, 15 Jun 2016 21:24:49 +0000 (23:24 +0200)
committerpaulfantom <paulfantom@gmail.com>
Wed, 15 Jun 2016 21:28:02 +0000 (23:28 +0200)
charts.d/mysql.chart.sh

index fe07658eaac2f051e9f732f91e50326e3f6c5af3..30ad74ea31e159aa8dcb9e8645f1719a39b32feb 100755 (executable)
@@ -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