Telegraf 1.27.4 Influxdb2-2.7.0 record by value of modbus register

Hi all,
What is the way, in telegraf with modbus plugin, if i want to record all the metrics only if one metric exced a value ?
Thanks for all.

I believe that the main use case of telegraf is to collect all data add the conditional stuff on the query side.

At least that is how I use it, and its nice to be able to log and see everything.

however, you could do what you need using the staralark plugin:

telegraf/plugins/processors/starlark/testdata/value_filter.star at master · influxdata/telegraf (github.com) .

Removing entire metric base on a field value. · Issue #3904 · influxdata/telegraf (github.com)

Ok, Thank you for all, i will try that.