summaryrefslogtreecommitdiffstats
path: root/charts.d
diff options
context:
space:
mode:
authorpaulfantom <paulfantom@gmail.com>2016-06-15 23:24:49 +0200
committerpaulfantom <paulfantom@gmail.com>2016-06-15 23:28:02 +0200
commit7ee587c5d77f3b7cb7f63e12ca1fc9435471d95c (patch)
tree030d6939bf28bd52b419c0e8f0086ef645a1478d /charts.d
parent1695134ed021019b7db9bf23fe80047f58a4c6ac (diff)
fix issue when dealing with MySQL
Diffstat (limited to 'charts.d')
-rwxr-xr-xcharts.d/mysql.chart.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/charts.d/mysql.chart.sh b/charts.d/mysql.chart.sh
index fe07658eaa..30ad74ea31 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