From: Florian Forster Date: Sun, 25 Apr 2010 13:32:50 +0000 (+0200) Subject: collectd-nagios.c: Output performance data with the "%f" format string. X-Git-Tag: collectd-4.10.0~3^2~1^2~2 X-Git-Url: https://git.octo.it/?p=collectd.git;a=commitdiff_plain;h=106e2016957fe53e4d249f1352bb5a7ec9caa76b 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: --- 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);