diff options
author | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2015-11-18 01:07:09 +0200 |
---|---|---|
committer | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2015-11-18 01:07:09 +0200 |
commit | c5572d0ddaf88f58995cfe4f916494e714c2f7ca (patch) | |
tree | d1a6ce7de038535b41179c463069eb2c35e1f2f4 /charts.d/mysql.chart.sh | |
parent | 1b68ee4b7b809471f52a63708d4fc020dbc93ee0 (diff) |
updated docs; nut.chart.sh now autodetects multiple UPSes, web and cache directories are chowned; charts.d is now enabled by default
Diffstat (limited to 'charts.d/mysql.chart.sh')
-rwxr-xr-x | charts.d/mysql.chart.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/charts.d/mysql.chart.sh b/charts.d/mysql.chart.sh index 72cbb41949..9390f972fe 100755 --- a/charts.d/mysql.chart.sh +++ b/charts.d/mysql.chart.sh @@ -7,7 +7,7 @@ # This statement does not require any privilege. # It requires only the ability to connect to the server. -mysql_cmd_opts="" +mysql_cmd_opts= mysql_update_every=5 mysql_get_stats() { @@ -15,6 +15,10 @@ mysql_get_stats() { } mysql_check() { + require_cmd mysql || exit 1 + require_cmd egrep || exit 1 + require_cmd sed || exit 1 + # check once if the url works local x="$(mysql_get_stats | grep "^Connections[[:space:]]")" if [ ! $? -eq 0 -o -z "$x" ] |