From a63967d6a961f989badb059e263eef16747a6704 Mon Sep 17 00:00:00 2001 From: Igor Zolotarev Date: Fri, 19 Apr 2024 12:09:11 +0300 Subject: [PATCH] Fix errors --- metrics/tarantool/memtx.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/metrics/tarantool/memtx.lua b/metrics/tarantool/memtx.lua index 97682154..6ddf27f5 100644 --- a/metrics/tarantool/memtx.lua +++ b/metrics/tarantool/memtx.lua @@ -123,7 +123,7 @@ local function update() -- Tarantool 3.0 memory statistics local ok, memtx_stat_3 = pcall(box.stat.memtx) - if not ok then + if not ok or memtx_stat_3.data == nil or memtx_stat_3.index == nil then return end @@ -144,11 +144,11 @@ local function update() collectors_list.memtx_index_extents_total = utils.set_gauge('memtx_index_extents_total', 'Total amount of memory allocated for indexing data', - memtx_stat_3.data.total, nil, nil, {default = true}) + memtx_stat_3.index.total, nil, nil, {default = true}) collectors_list.memtx_index_extents_read_view = utils.set_gauge('memtx_index_extents_read_view', 'Memory held for read views', - memtx_stat_3.data.read_view, nil, nil, {default = true}) + memtx_stat_3.index.read_view, nil, nil, {default = true}) end