mod_prometheus: Put the name as a label, which fits better the usual Prosody model.
--- a/mod_prometheus/mod_prometheus.lua Fri Jun 22 00:32:05 2018 +0200
+++ b/mod_prometheus/mod_prometheus.lua Fri Jun 22 00:38:37 2018 +0200
@@ -80,10 +80,10 @@
sect = sect:sub(16);
end
- local key = escape_name("prosody_"..sect.."_"..name);
+ local key = escape_name("prosody_"..sect);
local field = {
value = value,
- labels = {},
+ labels = { ["type"] = name},
-- TODO: Use the other types where it makes sense.
typ = (typ == "rate" and "counter" or "gauge"),
};