From 747d14faaa2a8d62c6b317ed9654046c6911bdba Mon Sep 17 00:00:00 2001 From: Igor Zolotarev <63460867+yngvar-antonsson@users.noreply.github.com> Date: Tue, 9 Aug 2022 16:02:15 +0400 Subject: [PATCH] Fix tnt_cartridge_failover_trigger metric name (#396) --- CHANGELOG.md | 2 +- doc/monitoring/metrics_reference.rst | 2 +- metrics/cartridge/failover.lua | 2 +- test/integration/cartridge_metrics_test.lua | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4013a066..419775db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Label `thread` for per thread reporting net statistics metrics. -- `tnt_cartridge_failover_trigger` metric +- `tnt_cartridge_failover_trigger_total` metric - New synchro and election metrics: - `tnt_synchro_queue_owner` - `tnt_synchro_queue_term` diff --git a/doc/monitoring/metrics_reference.rst b/doc/monitoring/metrics_reference.rst index 4a5c101d..c9ec065a 100644 --- a/doc/monitoring/metrics_reference.rst +++ b/doc/monitoring/metrics_reference.rst @@ -411,7 +411,7 @@ Cartridge * ``max`` -- difference with the fastest clock (always positive), * ``min`` -- difference with the slowest clock (always negative). - * - ``tnt_cartridge_failover_trigger`` + * - ``tnt_cartridge_failover_trigger_total`` - Count of failover triggers in cluster. .. _metrics-reference-luajit: diff --git a/metrics/cartridge/failover.lua b/metrics/cartridge/failover.lua index 02785b78..8b4e5945 100644 --- a/metrics/cartridge/failover.lua +++ b/metrics/cartridge/failover.lua @@ -16,7 +16,7 @@ local function update() if trigger_cnt ~= nil then collectors_list.trigger_cnt = utils.set_counter( - 'cartridge_failover_trigger', + 'cartridge_failover_trigger_total', 'Count of Cartridge Failover triggers', trigger_cnt ) diff --git a/test/integration/cartridge_metrics_test.lua b/test/integration/cartridge_metrics_test.lua index 2cf18332..861e9dea 100644 --- a/test/integration/cartridge_metrics_test.lua +++ b/test/integration/cartridge_metrics_test.lua @@ -137,7 +137,7 @@ g.test_failover = function() helpers.retrying({timeout = 30}, function() local resp = g.cluster:server('replica'):http_request('get', '/metrics') - local failover_trigger_cnt = utils.find_metric('tnt_cartridge_failover_trigger', resp.json) + local failover_trigger_cnt = utils.find_metric('tnt_cartridge_failover_trigger_total', resp.json) t.assert_equals(failover_trigger_cnt[1].value, 1) end)