Skip to content

Commit 3c8bb1c

Browse files
johanneswuerbachmergify-bot
authored andcommitted
feat(prom): expose cluster id in identity
(cherry picked from commit 84de860) (cherry picked from commit a8400ea)
1 parent 9a481e9 commit 3c8bb1c

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

deps/rabbitmq_prometheus/src/collectors/prometheus_rabbitmq_core_metrics_collector.erl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ identity_info() ->
288288
[
289289
{rabbitmq_node, node()},
290290
{rabbitmq_cluster, rabbit_nodes:cluster_name()}
291+
{rabbitmq_cluster_permanent_id, rabbit_nodes:persistent_cluster_id()}
291292
],
292293
1
293294
}]

deps/rabbitmq_prometheus/test/rabbit_prometheus_http_SUITE.erl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ identity_info_test(Config) ->
276276
?assertEqual(match, re:run(Body, "^rabbitmq_identity_info{", [{capture, none}, multiline])),
277277
?assertEqual(match, re:run(Body, "rabbitmq_node=", [{capture, none}])),
278278
?assertEqual(match, re:run(Body, "rabbitmq_cluster=", [{capture, none}])).
279+
?assertEqual(match, re:run(Body, "rabbitmq_cluster_permanent_id=", [{capture, none}])).
279280

280281
specific_erlang_metrics_present_test(Config) ->
281282
{_Headers, Body} = http_get_with_pal(Config, [], 200),

0 commit comments

Comments
 (0)