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
- Purpose: The purpose of this job is to monitor the state of all members in the Innodb cluster.
- Why: It is crucial to regularly check the status of members in a database cluster to ensure smooth and uninterrupted functioning. The job is designed to raise an alarm (with varying degrees of severity) if the state of any member is not online. The job also provides crucial information about the role of each cluster member and differentiates between the current and other members of the cluster.
- Manual checking: You can manually check the status of all members in the Innodb cluster in the database by issuing the following SQL command:
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
- Job Name: Innodb cluster status
- Version: 1.2
- Company: dbwatch.no
- Group: com.dbwatch.job
- Artifactid: mysql_innodb_cluster_status
- Category: Cluster and Replication
- Schedule: The job runs by default every 60 seconds.
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.