olafz / percona-clustercheck

Script to make a proxy (ie HAProxy) capable of monitoring Percona XtraDB Cluster nodes properly. The clustercheck script is distributed under the BSD license.
BSD 3-Clause "New" or "Revised" License
173 stars 108 forks source link

clustercheck not running correctly as MYSQL_USERNAME:=-clustercheckuser #29

Open jsanjuanph opened 5 years ago

jsanjuanph commented 5 years ago

On my test DB server running a MariaDB cluster:

$ ./clustercheck
HTTP/1.1 503 Service Unavailable
Content-Type: text/plain
Connection: close
Content-Length: 44

Percona XtraDB Cluster Node is not synced

$ mysql -u clustercheckuser -p -e "SHOW STATUS LIKE 'wsrep_local_state';"
Enter password:
+-------------------+-------+
| Variable_name     | Value |
+-------------------+-------+
| wsrep_local_state | 4     |
+-------------------+-------+

When I corrected the MYSQL_USERNAME to "clustercheckuser", the script now runs correctly. I have created a pull request for this.

$ ./clustercheck
HTTP/1.1 200 OK
Content-Type: text/plain
Connection: close
Content-Length: 40

Percona XtraDB Cluster Node is synced.
graywen24 commented 4 years ago

same here.. i dont know why never change this username ... also I add --host $DBVIP parameters else can not run it to remote db server.

dgeo commented 2 years ago

fix here: https://github.com/olafz/percona-clustercheck/pull/31/files