Galera Cluster node count


Job details

Name: Galera Cluster node count
Platform: Mariadb
Category: Cluster and Replication
Description: Checks the number of nodes currently in the cluster.
Long description: Checks the number of nodes currently in the cluster.
Version: 1.1
Default schedule: 5,15,25,35,45,55 * * *
Requires engine install: Yes
Compatibility tag: .[type=‘instance’ & is_mariadb_branch=‘1′]/.[hasengine=‘YES’ & use_global_variables_information_schema = ‘1′ & wsrep_cluster != ‘0′]

Parameters

Name Default value Description
cluster node count 0 The Galera Cluster node count.
return status 2 Return status value (ALARM – 2, WARNING – 1, or OK – 0) when the Galera Cluster node count is less than “cluster node count” parameter value.
enable warnings and alarms YES If set to “NO” (default), the alert will only collect statistics without returning status warning or alarm. Value “YES“ will activate the alert.
history threshold 7 The maximum number of day to kept statistics for in the historic tables.

Job Summary

SELECT VARIABLE_VALUE FROM information_schema.global_status WHERE variable_name = 'wsrep_cluster_size';

Implementation Details

The monitoring task performs several actions to check and record the number of nodes:

Dependency and Cleanup

The job depends on stored procedures and tables it creates:

If the installation or update fails, the job will execute cleanup operations:

Report and Visualization

After collecting data, the job compiles a report summarized in a graphical format, displaying the node count history over time:

Automation and Scheduling