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 <stirnamanj@gmail.com>

* Update data/telegraf_plugins.yml

Co-authored-by: Jason Stirnaman <stirnamanj@gmail.com>

---------

Co-authored-by: Jason Stirnaman <stirnamanj@gmail.com>
pull/5094/head
Joshua Powers 2023-08-17 09:41:49 -06:00 committed by GitHub
parent fe2748d5e6
commit a89a869d83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 7 deletions

View File

@ -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`.