- ssnprintf (key, sizeof (key), "collectd/%s", tmp);
-
- ssnprintf (value, sizeof (value), "%lu", (unsigned long) vl->time);
- for (i = 0; i < ds->ds_num; i++)
- {
- if (ds->ds[i].type == DS_TYPE_COUNTER)
- ssnprintf (tmp, sizeof (tmp), "%s:%llu",
- value, vl->values[i].counter);
- else if (ds->ds[i].type == DS_TYPE_GAUGE)
- ssnprintf (tmp, sizeof (tmp), "%s:%g",
- value, vl->values[i].gauge);
- else if (ds->ds[i].type == DS_TYPE_DERIVE)
- ssnprintf (tmp, sizeof (tmp), "%s:%"PRIi64,
- value, vl->values[i].derive);
- else if (ds->ds[i].type == DS_TYPE_ABSOLUTE)
- ssnprintf (tmp, sizeof (tmp), "%s:%"PRIu64,
- value, vl->values[i].absolute);
- else
- assert (23 == 42);
+ ssnprintf (key, sizeof (key), "collectd/%s", ident);
+ ssnprintf (time, sizeof (time), "%.9f", CDTIME_T_TO_DOUBLE(vl->time));