From a89a869d83d20fc8cf3a3d0c61566f39f64e0b2a Mon Sep 17 00:00:00 2001 From: Joshua Powers Date: Thu, 17 Aug 2023 09:41:49 -0600 Subject: [PATCH] fix: Clarify valuecounter aggregator (#5093) * fix: Clarify valuecounter aggregator The aggregator only applies to fields and not tags. The current example use-case explains how to use the aggregator, but the example itself is suggesting to use the aggreagator on tags that are generated. We got an issue complaining about this and I'd like to just remove it and instead clarify fields only. * Update data/telegraf_plugins.yml Co-authored-by: Jason Stirnaman * Update data/telegraf_plugins.yml Co-authored-by: Jason Stirnaman --------- Co-authored-by: Jason Stirnaman --- data/telegraf_plugins.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/data/telegraf_plugins.yml b/data/telegraf_plugins.yml index d53bd7fde..dd5b971b7 100644 --- a/data/telegraf_plugins.yml +++ b/data/telegraf_plugins.yml @@ -2788,14 +2788,11 @@ aggregator: id: valuecounter description: | The ValueCounter aggregator plugin counts the occurrence of values in fields - and emits the counter once every 'period' seconds. + and emits the count at regular intervals of 'period' seconds. + This plugin exclusively operates on fields and doesn't affect tags. - A use case for the ValueCounter aggregator plugin is when you are processing - an HTTP access log with the [Logparser input plugin](#logparser) and want to - count the HTTP status codes. - - The fields which will be counted must be configured with the fields configuration directive. - When no fields are provided, the plugin will not count any fields. + To count specific fields, configure them using the fields configuration directive. + If no fields are specified, the plugin won't count any fields. The results are emitted in fields, formatted as `originalfieldname_fieldvalue = count`. ValueCounter only works on fields of the type `int`, `bool`, or `string`.