InnoDB cluster status


Job details

Name: InnoDB cluster status
Platform: Mysql
Category: Cluster and Replication
Description: NDB data node status
Long description:
Version: 1.2
Default schedule: 60s
Requires engine install: No
Compatibility tag: .[type=‘instance’ & is_mysql_branch=‘1′ & use_global_variables_performance_schema = ‘1′]

Parameters

Name Default value Description
return_status 2 Return status value (ALARM – 2, WARNING – 1, or OK – 0) when member state is NOT ONLINE.
return_status_for_other_members 1 Return status value (ALARM – 2, WARNING – 1, or OK – 0) when other members state is NOT ONLINE.

Job Summary

SELECT  @@hostname, MEMBER_HOST, MEMBER_STATE, case when length(MEMBER_ROLE) = 0 then 'UNKNOWN' else MEMBER_ROLE end as role_val FROM performance_schema.replication_group_members. 

Additional Information

Details of the Cluster Status Check

This job uses SQL and JavaScript engines to collect and process information about the status of Innodb cluster members. The SQL command retrieves the hostname, member host, member state, and member role from the performance_schema.replication_group_members.

Additionally, the JavaScript portion of the code counts the number of members in the cluster, and distinguishes between the current and other members. The status of each member, their role, and the number of members in the cluster is then returned in a message string.

If any member (current or otherwise) is found to be not online, the job returns a status value indicating an alarm or warning state.

Report Generation

This job also includes a reporting feature that generates reports with the title “InnoDB cluster members”. The report, presented in the form of a table, details information about each member of the Innodb cluster.