]> arthur.barton.de Git - netdata.git/commitdiff
fixed fom mysql not reading Handler_X values in older systems
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Fri, 8 Jul 2016 14:13:51 +0000 (17:13 +0300)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Fri, 8 Jul 2016 14:13:51 +0000 (17:13 +0300)
charts.d/mysql.chart.sh

index 30ad74ea31e159aa8dcb9e8645f1719a39b32feb..e2392c23dcdc1dff4615a0d4a54328b7e718e9a0 100755 (executable)
@@ -18,7 +18,8 @@ mysql_get() {
        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=($("${@}" -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]" ))
+       #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]" ))
+       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]+" ))
        IFS="${oIFS}"
 
        [ "${#arr[@]}" -lt 3 ] && return 1