]> arthur.barton.de Git - netdata.git/blobdiff - charts.d/mysql.chart.sh
Merge pull request #1637 from ktsaou/master
[netdata.git] / charts.d / mysql.chart.sh
index 2bb80a8a9c888b5401d1c80b360630f0aa675a93..1363d01f420c1a2ed19f4aabd0a319209030199f 100755 (executable)
@@ -1,5 +1,11 @@
 # no need for shebang - this file is loaded from charts.d.plugin
 
+# netdata
+# real-time performance and health monitoring, done right!
+# (C) 2016 Costa Tsaousis <costa@tsaousis.gr>
+# GPL v3+
+#
+
 # http://dev.mysql.com/doc/refman/5.0/en/server-status-variables.html
 #
 # https://dev.mysql.com/doc/refman/5.1/en/show-status.html
@@ -49,7 +55,7 @@ mysql_check() {
                shift
        fi
 
-       [ -z "${mysql_cmd}" ] && mysql_cmd="$(which mysql)"
+       [ -z "${mysql_cmd}" ] && mysql_cmd="$(which mysql 2>/dev/null || command -v mysql 2>/dev/null)"
 
        if [ ${#mysql_opts[@]} -eq 0 ]
                then