telegraftelegraf-plugins

Limiting Telegraf Aggregator Plugin to Certain Metrics?


i have network interface counter data (bytes in/bytes out) being collected by telegraf thru GNMI subscriptions to network devices. i am storing this raw data (un InfluxDB) already, but i want to add a rate calculation as well. i am considering using the aggregators.derivative plugin in telegraf.

i think i understand the aggregators sit between input plugins and output plugins, but how do i chain them together? for instance, i am gathering several metrics in this instance of telegraf via several input plugins, but i only need a rate calculation for the gnmi plugin data, and only a couple of fields on that metric. how do i limit the scope of the aggregator to just the metrics gathered by the gnmi input plugin?

Or do i just plop the aggregator plugin config into telegraf and it just automatically affects all input plugin data?

i have not tried anything yet because i don't know what to do. The instructions are unclear and i can't seem to find any example configuration in the context of a whole telegraf config.


Solution

  • You can use filtering to obtain the desired behavior.

    I recommend experimenting with a small configuration file, that helps to understand Telegraf.