fix: `shared_subscriptions` is cluster consistented

This commit is contained in:
JimMoen 2024-03-15 12:57:01 +08:00
parent 3f93780d8c
commit e56bee618b
No known key found for this signature in database
2 changed files with 6 additions and 3 deletions

View File

@ -264,6 +264,8 @@ merge_cluster_rate(Node, Cluster) ->
NCluster#{topics => V};
(retained_msg_count, V, NCluster) ->
NCluster#{retained_msg_count => V};
(shared_subscriptions, V, NCluster) ->
NCluster#{shared_subscriptions => V};
(license_quota, V, NCluster) ->
NCluster#{license_quota => V};
%% for cluster sample, ignore node_uptime

View File

@ -511,8 +511,6 @@ stats_metric_meta() ->
{emqx_subscribers_max, gauge, 'subscribers.max'},
{emqx_subscriptions_count, gauge, 'subscriptions.count'},
{emqx_subscriptions_max, gauge, 'subscriptions.max'},
{emqx_subscriptions_shared_count, gauge, 'subscriptions.shared.count'},
{emqx_subscriptions_shared_max, gauge, 'subscriptions.shared.max'},
%% delayed
{emqx_delayed_count, gauge, 'delayed.count'},
{emqx_delayed_max, gauge, 'delayed.max'}
@ -525,7 +523,10 @@ stats_metric_cluster_consistened_meta() ->
{emqx_topics_count, gauge, 'topics.count'},
%% retained
{emqx_retained_count, gauge, 'retained.count'},
{emqx_retained_max, gauge, 'retained.max'}
{emqx_retained_max, gauge, 'retained.max'},
%% shared subscriptions
{emqx_subscriptions_shared_count, gauge, 'subscriptions.shared.count'},
{emqx_subscriptions_shared_max, gauge, 'subscriptions.shared.max'}
].
stats_data(Mode) ->