feat(emqx_prometheus): expose live_connections stats to prometheus
This commit is contained in:
parent
e694e5fd13
commit
19c2288a4b
|
@ -219,6 +219,10 @@ emqx_collect(emqx_connections_count, Stats) ->
|
||||||
gauge_metric(?C('connections.count', Stats));
|
gauge_metric(?C('connections.count', Stats));
|
||||||
emqx_collect(emqx_connections_max, Stats) ->
|
emqx_collect(emqx_connections_max, Stats) ->
|
||||||
gauge_metric(?C('connections.max', Stats));
|
gauge_metric(?C('connections.max', Stats));
|
||||||
|
emqx_collect(emqx_live_connections_count, Stats) ->
|
||||||
|
gauge_metric(?C('live_connections.count', Stats));
|
||||||
|
emqx_collect(emqx_live_connections_max, Stats) ->
|
||||||
|
gauge_metric(?C('live_connections.max', Stats));
|
||||||
%% sessions
|
%% sessions
|
||||||
emqx_collect(emqx_sessions_count, Stats) ->
|
emqx_collect(emqx_sessions_count, Stats) ->
|
||||||
gauge_metric(?C('sessions.count', Stats));
|
gauge_metric(?C('sessions.count', Stats));
|
||||||
|
@ -460,6 +464,8 @@ emqx_stats() ->
|
||||||
[
|
[
|
||||||
emqx_connections_count,
|
emqx_connections_count,
|
||||||
emqx_connections_max,
|
emqx_connections_max,
|
||||||
|
emqx_live_connections_count,
|
||||||
|
emqx_live_connections_max,
|
||||||
emqx_sessions_count,
|
emqx_sessions_count,
|
||||||
emqx_sessions_max,
|
emqx_sessions_max,
|
||||||
emqx_topics_count,
|
emqx_topics_count,
|
||||||
|
|
Loading…
Reference in New Issue