changeset 1692:44ddec97ad82

mod_munin: Use string.format flag instead of tostring when reporting values
author Kim Alvefur <zash@zash.se>
date Tue, 05 May 2015 01:37:21 +0200
parents 1a8c791d365f
children 2328cbc41045
files mod_munin/mod_munin.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_munin/mod_munin.lua	Sun May 03 14:05:43 2015 +0200
+++ b/mod_munin/mod_munin.lua	Tue May 05 01:37:21 2015 +0200
@@ -70,7 +70,7 @@
 	if not stat then conn:write("# Unknown service\n.\n"); return end
 	for _, name, value in data:iter(stat, nil) do
 		if not ignore_stats:contains(name) then
-			conn:write(s_format("%s.value %s\n", name, tostring(value)));
+			conn:write(s_format("%s.value %.12f\n", name, value));
 		end
 	end
 	conn:write(".\n");