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
{