author | Florian Forster <octo@collectd.org> | |
Mon, 14 Jan 2013 08:49:17 +0000 (09:49 +0100) | ||
committer | Florian Forster <octo@collectd.org> | |
Mon, 14 Jan 2013 08:49:17 +0000 (09:49 +0100) |
1 | 2 | |||
---|---|---|---|---|
src/riemann.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc src/riemann.c
index a22111279f87997d2b45ad6c566e63fc6f8f564d,ebffd6c853041a3723f66706f3aafe65acfa9785..4af77b43f3f8a713f66c8806f747e4da54749935
--- 1/src/riemann.c
--- 2/src/riemann.c
+++ b/src/riemann.c
riemann_event_add_tag (event, "ds_name:%s", ds->ds[index].name);
riemann_event_add_tag (event, "ds_index:%zu", index);
- for (i = 0; i < riemann_tagcount; i++)
+ for (i = 0; i < riemann_tags_num; i++)
riemann_event_add_tag (event, "%s", riemann_tags[i]);
- if (rates != NULL)
+ if (ds->ds[index].type == DS_TYPE_GAUGE)
{
event->has_metric_d = 1;
- event->metric_d = (double) rates[index];
+ event->metric_d = (double) vl->values[index].gauge;
}
- else if (ds->ds[index].type == DS_TYPE_GAUGE)
+ else if (rates != NULL)
{
event->has_metric_d = 1;
- event->metric_d = (double) vl->values[index].gauge;
+ event->metric_d = (double) rates[index];
}
else
{