Skip to main content
Version: Mosquitto 3.1

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

labelmetric typedescription
mosquitto_ha_voting_nodesGaugeNumber of configured cluster nodes
mosquitto_ha_voting_nodes_onlineGaugeNumber of online cluster nodes (available on leader only)
mosquitto_cluster_stored_clientsGaugeNumber of clients in the cluster store (since 3.0.0)
mosquitto_cluster_stored_subscriptionsGaugeNumber of subscriptions in the cluster store (since 3.0.0)
mosquitto_cluster_stored_base_messagesGaugeNumber of base messages in the cluster store (since 3.0.0)
mosquitto_cluster_stored_client_messagesGaugeNumber of client messages in the cluster store (since 3.0.0)
mosquitto_cluster_stored_retain_messagesGaugeNumber of retain messages in the cluster store (since 3.0.0)
mosquitto_cluster_stored_messages_to_deleteGaugeNumber of base messages awaiting deletion in the cluster store (since 3.0.0)
mosquitto_cluster_stored_num_snapshotsCounterNumber of snapshot creations (since 3.1.0)
mosquitto_cluster_stored_snapshot_size_bytesGaugeSize of the last snapshot in bytes (since 3.1.0)
mosquitto_cluster_raft_pendingGaugeNumber of cluster message pending raft thread processing (since 3.1.0)
mosquitto_cluster_raft_processedCounterNumber of cluster message processed by raft thread (since 3.1.0)
mosquitto_cluster_raft_appliedCounterNumber of cluster message applied by raft consensus (since 3.1.0)
mosquitto_cluster_mosquitto_pendingGaugeNumber of cluster message pending mosquitto thread processing (since 3.1.0)
mosquitto_cluster_mosq_processedCounterNumber of cluster message applied to node state (since 3.1.0)
mosquitto_cluster_performance_mosq_changesCounterTicks the raft thread spent adding mosquitto changes (since 3.1.0)
mosquitto_cluster_performance_raft_internalCounterTicks the raft thread spent with consensus management (since 3.1.0)
mosquitto_cluster_performance_snapshotsCounterTicks the raft thread was spent creating a snapshots (since 3.1.0)
mosquitto_cluster_performance_idleCounterTicks 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 to mosquitto_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