diff options
author | Dylan Wang <wanghaoyu@frazil.me> | 2020-01-10 01:02:07 +0800 |
---|---|---|
committer | thiagoftsm <thiagoftsm@gmail.com> | 2020-01-09 17:02:07 +0000 |
commit | ff548d49dd23a5073029f62ec334f8fc27b0f724 (patch) | |
tree | 76391144471ecea68b59b3069d7808c15b22bda6 /backends/prometheus | |
parent | 2c0f57151e09b6eda008181912fb891e0a471544 (diff) |
fix remote write value with average data source (#7694)
Diffstat (limited to 'backends/prometheus')
-rw-r--r-- | backends/prometheus/backend_prometheus.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/backends/prometheus/backend_prometheus.c b/backends/prometheus/backend_prometheus.c index 03323ac54f..2db911621d 100644 --- a/backends/prometheus/backend_prometheus.c +++ b/backends/prometheus/backend_prometheus.c @@ -697,7 +697,7 @@ void rrd_stats_remote_write_allmetrics_prometheus( prometheus_label_copy(dimension, (backend_options & BACKEND_OPTION_SEND_NAMES && rd->name) ? rd->name : rd->id, PROMETHEUS_ELEMENT_MAX); snprintf(name, PROMETHEUS_LABELS_MAX, "%s_%s%s%s", prefix, context, units, suffix); - add_metric(name, chart, family, dimension, hostname, rd->last_collected_value, timeval_msec(&rd->last_collected_time)); + add_metric(name, chart, family, dimension, hostname, value, last_t * MSEC_PER_SEC); (*count_dims)++; } } |