influxdata/telegraf

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

Open

#11 097 ouverte le 13 mai 2022

Voir sur GitHub
 (8 commentaires) (0 réactions) (0 assignés)Go (4 161 forks)batch import
feature requesthelp wantedsize/l

Métriques du dépôt

Stars
 (9 892 stars)
Métriques de merge PR
 (Merge moyen 2j 12h) (136 PRs mergées en 30 j)

Description

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.

Guide contributeur