Mercurial > prosody-modules
changeset 1676:accbf0db0246
mod_munin: Exclude ignored stats even if they happen to be included in data
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 23 Apr 2015 16:58:57 +0200 |
parents | 116488cced16 |
children | 2a4c632a24cb |
files | mod_munin/mod_munin.lua |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_munin/mod_munin.lua Wed Apr 22 13:20:47 2015 +0200 +++ b/mod_munin/mod_munin.lua Thu Apr 23 16:58:57 2015 +0200 @@ -58,7 +58,7 @@ conn:write(s_format("%s %s\n", k, value)); end for _, name, k, value in meta:iter(stat, nil, nil) do - if name ~= "" then + if name ~= "" and not ignore_stats:contains(name) then conn:write(s_format("%s.%s %s\n", name, k, value)); end end @@ -69,7 +69,9 @@ local stat = line:match("%s(%S+)"); if not stat then conn:write("# Unknown service\n.\n"); return end for _, name, value in data:iter(stat, nil) do - conn:write(s_format("%s.value %s\n", name, tostring(value))); + if not ignore_stats:contains(name) then + conn:write(s_format("%s.value %s\n", name, tostring(value))); + end end conn:write(".\n"); end