From 106e2016957fe53e4d249f1352bb5a7ec9caa76b Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sun, 25 Apr 2010 15:32:50 +0200 Subject: [PATCH] collectd-nagios.c: Output performance data with the "%f" format string. Apparently the parser used by nagios is dumb as bread. Thanks to Lao Wai for pointing this out. For more information, see: --- src/collectd-nagios.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/collectd-nagios.c b/src/collectd-nagios.c index 29e34a4c..45162bd3 100644 --- a/src/collectd-nagios.c +++ b/src/collectd-nagios.c @@ -316,7 +316,7 @@ static int do_check_con_none (size_t values_num, { printf (" |"); for (i = 0; i < values_num; i++) - printf (" %s=%g;;;;", values_names[i], values[i]); + printf (" %s=%f;;;;", values_names[i], values[i]); } printf ("\n"); @@ -370,7 +370,7 @@ static int do_check_con_average (size_t values_num, printf ("%s: %g average |", status_str, average); for (i = 0; i < values_num; i++) - printf (" %s=%g;;;;", values_names[i], values[i]); + printf (" %s=%f;;;;", values_names[i], values[i]); printf ("\n"); return (status_code); @@ -420,7 +420,7 @@ static int do_check_con_sum (size_t values_num, printf ("%s: %g sum |", status_str, total); for (i = 0; i < values_num; i++) - printf (" %s=%g;;;;", values_names[i], values[i]); + printf (" %s=%f;;;;", values_names[i], values[i]); printf ("\n"); return (status_code); -- 2.30.2