influxdata/telegraf

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

Open

#11.097 aperta il 13 mag 2022

Vedi su GitHub
 (8 commenti) (0 reazioni) (0 assegnatari)Go (4161 fork)batch import
feature requesthelp wantedsize/l

Metriche repository

Star
 (9892 star)
Metriche merge PR
 (Merge medio 2g 12h) (136 PR mergiate in 30 g)

Descrizione

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.

Guida contributor