@cryptotaxi247 / netdata-1 / commits / d27f5b4f6

fix to upper case variables in mysql

Costa Tsaousis (ktsaou) committed Oct 21, 2015 at 12:59 UTC d27f5b4f627e587e45625a4cfebe0c7621923c69
1 file changed +6 -2
charts.d/mysql.chart.sh
+6 -2
@@ -1,6 +1,11 @@
1 #!/bin/sh
2
3 # http://dev.mysql.com/doc/refman/5.0/en/server-status-variables.html
4 +#
5 +# https://dev.mysql.com/doc/refman/5.1/en/show-status.html
6 +# SHOW STATUS provides server status information (see Section 5.1.6, “Server Status Variables”).
7 +# This statement does not require any privilege.
8 +# It requires only the ability to connect to the server.
9
10 mysql_cmd_opts=""
11 mysql_update_every=5
@@ -67,7 +72,6 @@ DIMENSION Sort_merge_passes merge_passes incremental 1 $((1 * mysql_update_every
72 DIMENSION Sort_range range incremental 1 $((1 * mysql_update_every))
73 DIMENSION Sort_scan scan incremental 1 $((1 * mysql_update_every))
74 EOF
70 -
75 return 0
76 }
77
@@ -92,7 +96,7 @@ mysql_update() {
96 # even if something goes wrong, no other code can be executed
97
98 eval "$(mysql_get_stats |\
95 - sed -e "s/[[:space:]]\+/ /g" -e "s/\./_/g" -e "s/^\([a-z0-9_]\+\)[[:space:]]\+\([0-9]\+\)$/local mysql_\1=\2/g" |\
99 + sed -e "s/[[:space:]]\+/ /g" -e "s/\./_/g" -e "s/^\([a-zA-Z0-9_]\+\)[[:space:]]\+\([0-9]\+\)$/local mysql_\1=\2/g" |\
100 egrep "^local mysql_[a-zA-Z0-9_]+=[[:digit:]]+$")"
101
102 # write the result of the work.