influxdata/telegraf

Adding a "first" and "last" measurement option to the BasicStats aggregator

Open

#11,097 创建于 2022年5月13日

在 GitHub 查看
 (8 评论) (0 反应) (0 负责人)Go (4,161 fork)batch import
feature requesthelp wantedsize/l

仓库指标

Star
 (9,892 star)
PR 合并指标
 (平均合并 2天 12小时) (30 天内合并 136 个 PR)

描述

Feature Request

Opening a feature request kicks off a discussion.

Proposal:

Besides the current measurements, such as "min", "max" and "mean" I would like to have the "last" or "first" value out of each period being returned.

Current behavior:

This is not available currently.

Desired behavior:

Be able to specify that the "first" and/or "last" value out of all measurements in every "period" of seconds is returned out of a series of continuous measurements.

Note: the "Final" Aggregator does not work as required, as this only submits a " final" measurement if there are no measurements during a set timeout. This however does not work for continuous streams of measurements without interruptions/timeouts.

Use case:

I have measurements published on Mosquito that I wish to monitor in real-time. So the input to telegraf/Mosquitto must not be throttled. For analysis however the measurements could be reduced from 1 sample per second to once per minute.

With this new feature this could be done in memory/Telegraf before the data is written to Influx, which drastically reduces the number of writes to e.g. Influx.

贡献者指南