From 6be163dc23c87caa6d50ecf1016dc5d70ac9cf93 Mon Sep 17 00:00:00 2001 From: Ilya Khaprov Date: Mon, 27 Feb 2017 11:25:11 +0300 Subject: [PATCH] rename rabbitmq_nodes_up to rabbitmq_node_up, fix #19 --- README.md | 2 +- src/collectors/prometheus_rabbitmq_nodes_collector.erl | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 81b794c..968a6b9 100644 --- a/README.md +++ b/README.md @@ -307,7 +307,7 @@ Disk space occupied by the table (DCL + DCD). Cluster/nodes metrics. -* `rabbitmq_nodes_running`
+* `rabbitmq_node_up`
Type: boolean.
Labels: name, type.
Node running status. diff --git a/src/collectors/prometheus_rabbitmq_nodes_collector.erl b/src/collectors/prometheus_rabbitmq_nodes_collector.erl index 814b21d..6e36793 100644 --- a/src/collectors/prometheus_rabbitmq_nodes_collector.erl +++ b/src/collectors/prometheus_rabbitmq_nodes_collector.erl @@ -33,12 +33,11 @@ deregister_cleanup(_) -> ok. collect_mf(_Registry, Callback) -> Nodes = all_nodes_raw(), - [Callback(create_untyped(rabbitmq_nodes_up, "Node runnning status", Node)) || Node <- Nodes], - + Callback(create_untyped(rabbitmq_node_up, "Node runnning status", Nodes)), ok. -collect_metrics(rabbitmq_nodes_up, Node) -> - untyped_metric(labels(Node), node_running(Node)). +collect_metrics(rabbitmq_node_up, Nodes) -> + [untyped_metric(labels(Node), node_running(Node)) || Node <- Nodes]. %%==================================================================== %% Private Parts