From: Florian Forster Date: Mon, 14 Jan 2013 08:49:17 +0000 (+0100) Subject: Merge remote-tracking branch 'github-octo/pyr/riemann' into pyr/riemann X-Git-Tag: collectd-5.3.0~56^2~8 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=917c18f7783c176e0df13a017f1ca1213724910c;p=collectd.git Merge remote-tracking branch 'github-octo/pyr/riemann' into pyr/riemann --- 917c18f7783c176e0df13a017f1ca1213724910c diff --cc src/riemann.c index a2211127,ebffd6c8..4af77b43 --- a/src/riemann.c +++ b/src/riemann.c @@@ -293,18 -316,18 +303,18 @@@ static Event *riemann_value_to_protobu 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 {