From 1ac4aed7cde1aec722542199e488bc537423adbf Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Wed, 24 Nov 2021 20:03:38 +0100 Subject: mod_admin_shell: List collected metrics in module:info Lets you know what to look for with stats:show() --- core/moduleapi.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core') diff --git a/core/moduleapi.lua b/core/moduleapi.lua index ab154742..40c091ad 100644 --- a/core/moduleapi.lua +++ b/core/moduleapi.lua @@ -531,6 +531,7 @@ function api:measure(name, stat_type, conf) -- an array of labels -- the prosody_ prefix is automatically added by statsmanager for legacy -- metrics. + self:add_item("measure", { name = name, type = stat_type, conf = conf }); return measure(stat_type, "mod_"..self.name.."/"..name, conf, fixed_label_key, fixed_label_value) end @@ -544,6 +545,7 @@ function api:metric(type_, name, unit, description, label_keys, conf) label_keys:append(orig_labels) end local mf = metric(type_, "prosody_mod_"..self.name.."/"..name, unit, description, label_keys, conf) + self:add_item("metric", { name = name, mf = mf }); if is_scoped then -- make sure to scope the returned metric family to the current host return mf:with_partial_label(self.host) -- cgit v1.2.3