summaryrefslogtreecommitdiffstats
path: root/charts.d/mysql.chart.sh
diff options
context:
space:
mode:
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2016-07-08 17:13:51 +0300
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2016-07-08 17:13:51 +0300
commit9f7d9bf40e61ca5d5acb872221a82576dc76e7e3 (patch)
tree6508f8e150492974960df8d4bfe5607a000a3ed0 /charts.d/mysql.chart.sh
parentf52e3f009b0c2140e3416058168f70cc090e6e4b (diff)
fixed fom mysql not reading Handler_X values in older systems
Diffstat (limited to 'charts.d/mysql.chart.sh')
-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 30ad74ea31..e2392c23dc 100755
--- a/charts.d/mysql.chart.sh
+++ b/charts.d/mysql.chart.sh
@@ -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