Monitoring Clusters
The following document provides a comprehensive list of all cluster related metrics for clustered Pro Mosquitto. Some metrics maybe available on the active leader node only. The general broker metrics are described in available broker metrics
label | metric type | description |
---|---|---|
mosquitto_ha_voting_nodes | Gauge | Number of configured cluster nodes |
mosquitto_ha_voting_nodes_online | Gauge | Number of online cluster nodes (available on leader only) |
mosquitto_cluster_stored_clients | Gauge | Number of clients in the cluster store (since 3.0.0) |
mosquitto_cluster_stored_subscriptions | Gauge | Number of subscriptions in the cluster store (since 3.0.0) |
mosquitto_cluster_stored_base_messages | Gauge | Number of base messages in the cluster store (since 3.0.0) |
mosquitto_cluster_stored_client_messages | Gauge | Number of client messages in the cluster store (since 3.0.0) |
mosquitto_cluster_stored_retain_messages | Gauge | Number of retain messages in the cluster store (since 3.0.0) |
mosquitto_cluster_stored_messages_to_delete | Gauge | Number of base messages awaiting deletion in the cluster store (since 3.0.0) |
mosquitto_cluster_stored_num_snapshots | Counter | Number of snapshot creations (since 3.1.0) |
mosquitto_cluster_stored_snapshot_size_bytes | Gauge | Size of the last snapshot in bytes (since 3.1.0) |
mosquitto_cluster_raft_pending | Gauge | Number of cluster message pending raft thread processing (since 3.1.0) |
mosquitto_cluster_raft_processed | Counter | Number of cluster message processed by raft thread (since 3.1.0) |
mosquitto_cluster_raft_applied | Counter | Number of cluster message applied by raft consensus (since 3.1.0) |
mosquitto_cluster_mosquitto_pending | Gauge | Number of cluster message pending mosquitto thread processing (since 3.1.0) |
mosquitto_cluster_mosq_processed | Counter | Number of cluster message applied to node state (since 3.1.0) |
mosquitto_cluster_performance_mosq_changes | Counter | Ticks the raft thread spent adding mosquitto changes (since 3.1.0) |
mosquitto_cluster_performance_raft_internal | Counter | Ticks the raft thread spent with consensus management (since 3.1.0) |
mosquitto_cluster_performance_snapshots | Counter | Ticks the raft thread was spent creating a snapshots (since 3.1.0) |
mosquitto_cluster_performance_idle | Counter | Ticks the raft thread was idle (since 3.1.0) |
Remarks
- To monitor the health state of the cluster compare the
mosquitto_ha_voting_nodes_online
of the active leader tomosquitto_ha_voting_nodes
. The leader should report the maximum of all reported online nodes. All other cluster member report no active nodes. If the number of online nodes is lower than the configured number of nodes the cluster is degraded. - The frequency of the tick related counters can be obtained from the general broker metric
mosquitto_performance_counter_frequency