[Check_mk (english)] MySql clustered (active-passive) setup problem

Dear Community,

I have some troubles with the setup of MySQL 2 nodes active-passive cluster.

I have two nodes ‘mysql1’ (active) and ‘mysql2’ (passive).

NEW cluster node ‘mysql’ -> OK

RULE Clustered services -> OK

ALL ^MySQL services moved to cluster node -> OK

Agent output from active node is OK -> MySQL is alive

Agent output from the second node:

mysqladmin: connect to server at ‘localhost’ failed

error: ‘Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)’

Check that mysqld is running and that the socket: ‘/var/lib/mysql/mysql.sock’ exists!

This is normal since the second instance is passive and does not run mysql.

The problem is that on the cluster node ‘mysql’ the service ‘MySQL Instance mysq’ has CRITICAL message:

CRIT - mysqladmin: connect to server at ‘localhost’ failed

I did re-inventory on all nodes, but the critical message remains. All other services on the cluster node are in green status. only the ‘MySQL Instance mysq’ is critical.

My understanding is that the logic should be ‘OR’ between clustered services. The service should be in green only on one of the clustered nodes. The service on cluster node will become RED if both services on clustered nodes (mysql1&2) are CRITICAL (down). Is this correct? If not, please correct me or point me to some topic with explanation. I’ve tried to find similar issue in the mailing lists, but without success.

Would you please help me with this?

My CMK version is pretty old (1.2.8p17), but still very stable.

Regards,

Ivan

Hi Ivan,

your problem is that the "MySQL Instance ..." check is not cluster
aware. This is a little bit different then checking a running process.
The process is running only on one node and all is good but the check
brings data on both nodes.
And check_mk is only combining the two states. If the second node is
active and the first one passive you will see a OK result on your
cluster service.

I don't know a good and easy solution for this problem.

br
Andreas

···

Am Fr., 12. Apr. 2019 um 15:54 Uhr schrieb Ivan Velikov <ivelikov@gmail.com>:

Dear Community,

I have some troubles with the setup of MySQL 2 nodes active-passive cluster.
I have two nodes 'mysql1' (active) and 'mysql2' (passive).
NEW cluster node 'mysql' -> OK
RULE Clustered services -> OK
ALL ^MySQL services moved to cluster node -> OK
Agent output from active node is OK -> MySQL is alive
Agent output from the second node:
   mysqladmin: connect to server at 'localhost' failed
   error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
   Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!

This is normal since the second instance is passive and does not run mysql.

The problem is that on the cluster node 'mysql' the service 'MySQL Instance mysq' has CRITICAL message:
CRIT - mysqladmin: connect to server at 'localhost' failed

I did re-inventory on all nodes, but the critical message remains. All other services on the cluster node are in green status. only the 'MySQL Instance mysq' is critical.

My understanding is that the logic should be 'OR' between clustered services. The service should be in green only on one of the clustered nodes. The service on cluster node will become RED if both services on clustered nodes (mysql1&2) are CRITICAL (down). Is this correct? If not, please correct me or point me to some topic with explanation. I've tried to find similar issue in the mailing lists, but without success.

Would you please help me with this?
My CMK version is pretty old (1.2.8p17), but still very stable.

Regards,
Ivan

_______________________________________________
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
Manage your subscription or unsubscribe
https://lists.mathias-kettner.de/cgi-bin/mailman/listinfo/checkmk-en