简体   繁体   English

为什么Telegraf向InfluxDB发送持续更新的statsd指标

[英]Why is telegraf sending continuously updating statsd metrics to influxdb

I'm trying to collect statsd metrics in an influxdb/telegraf/grafana server. 我正在尝试在influxdb / telegraf / grafana服务器中收集statsd指标。 What I'm seeing is that there is a continuous stream of entries in influxdb every 10 seconds from telegraf. 我看到的是,每10秒钟来自telegraf的influxdb中就会有连续的条目流。 How can I configure telegraf to only send an update to influxdb whenever it receives a statsd metric over UDP. 我如何将telegraf配置为仅在收到基于UDP的statsd指标时才将更新发送到influxdb。 I don't want a continuously updating value because I want to see the discrete event counts over time periods in grafana. 我不想持续更新值,因为我想查看grafana中随时间推移的离散事件计数。

For example, if I send exactly one counter metric (value=1) at time t0 and no more events for 10 minutes (say), I expect to see exactly one data point for the 10 minute time period I'm aggregating over in Grafana. 例如,如果我在时间t0刚好发送了一个计数器指标(值= 1),并且在10分钟内没有再发生任何事件(例如),那么我希望在Grafana中汇总的10分钟时间内看到一个数据点。 However, what I see is that every 10s there is an entry in the influxdb telegraph table for the measurement with the value of 1. Grafana would then show me a continuous value of 1 over each 10 minute period. 但是,我看到的是,每10秒在influxdb电报表中就有一个用于测量的条目,其值为1。然后,Grafana将为我显示每10分钟的连续值1。 What I really want is that in the 10 minute period where t0 existed, that the value 1 would be shown, whereas in all subsequent time periods (until the next metric, of course), the value would be 0. 我真正想要的是在存在t0的10分钟内显示值1,而在随后的所有时间段内(当然,直到下一个度量标准)该值都为0。

How can I achieve that? 我该如何实现? I see nothing in the telegraf documentation for the statsd plugin that says it will continuously update influxdb with the aggregated value (since the beginning of time) that telegraf has cached. 在telegraf文档中,我看不到statsd插件的内容,该插件说它将使用telegraf缓存的聚合值(自时间开始)不断更新influxdb。

In telegraf.conf , change the following to true: telegraf.conf ,将以下内容更改为true:

    [[input.statsd]]

     delete_counters = true

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM