Diff

mod_munin/mod_munin.lua @ 1897:effd909d05b0

mod_munin: Strip mod_measure_ and mod_statistics_ from section names
author Kim Alvefur <zash@zash.se>
date Wed, 07 Oct 2015 20:41:20 +0200
parent 1692:44ddec97ad82
child 1898:d85ddd3e588a
line wrap: on
line diff
--- a/mod_munin/mod_munin.lua	Sun Oct 04 23:28:26 2015 +0200
+++ b/mod_munin/mod_munin.lua	Wed Oct 07 20:41:20 2015 +0200
@@ -93,6 +93,11 @@
 			elseif host == "*" then
 				host = nil;
 			end
+			if sect:find"^mod_measure_.") then
+				sect = sect:sub(13);
+			elseif sect:find"^mod_statistics_.") then
+				sect = sect:sub(16);
+			end
 			key = clean_fieldname(s_format("%s_%s_%s", host or "global", sect, typ));
 
 			if not meta:get(key) then