Inndob Cluster - Automatically collect the output from mysqlsh?
1
vote
1
answer
393
views
Is there a way to take the output from mysqlshell and use it in a script or similar.
I have set up a basic cluster for testing (3 x MySQL 8.0.27 databases, running on Debian 11).
I am now trying to find a way to capture the output from mysqlshell's
cluster.status()
output.
As an example, from inside mysqlshell I can run:
cluster=dba.getCluster()
cluster.status().defaultReplicaSet.topology['test-1:3306'].replicationLag
to get the current replication lag. I would like to capture that so it can be monitored automatically.
I assumed most of these statistics would also exist in the performance_schema
or mysql_innodb_cluster_metadata
databases somewhere, but I can't see them.
Is there a way to do this?
Asked by IGGt
(2276 rep)
Jan 21, 2022, 02:29 PM
Last activity: Jan 27, 2022, 03:48 PM
Last activity: Jan 27, 2022, 03:48 PM