X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Ftarget_notification.c;h=2e5ab3b22d552552b186e0fbb3bb83a27f39ea71;hb=741e018fff531bfe914781489d9b2c7a002f2bc7;hp=5eaa427528183e2ac70ad47ec647ffb21034eb9f;hpb=6e430c3eea4a35438b634ae00fc32052b30ec9ae;p=collectd.git diff --git a/src/target_notification.c b/src/target_notification.c index 5eaa4275..2e5ab3b2 100644 --- a/src/target_notification.c +++ b/src/target_notification.c @@ -256,12 +256,12 @@ static int tn_invoke (const data_set_t *ds, value_list_t *vl, /* {{{ */ /* If this is a gauge value, use the current value. */ if (ds->ds[i].type == DS_TYPE_GAUGE) ssnprintf (value_str, sizeof (value_str), - "%g", (double) vl->values[i].gauge); + GAUGE_FORMAT, (double) vl->values[i].gauge); /* If it's a counter, try to use the current rate. This may fail, if the * value has been renamed. */ else if (rates != NULL) ssnprintf (value_str, sizeof (value_str), - "%g", (double) rates[i]); + GAUGE_FORMAT, (double) rates[i]); /* Since we don't know any better, use the string `unknown'. */ else sstrncpy (value_str, "unknown", sizeof (value_str));