Clarify what it means to filter metrics from processors

This commit is contained in:
Daniel Nelson 2017-10-30 16:32:39 -07:00
parent c116af35c7
commit 777b84d1dc
No known key found for this signature in database
GPG Key ID: CAAD59C9444F6155
2 changed files with 30 additions and 1 deletions

View File

@ -39,6 +39,11 @@ metrics as they pass through Telegraf:
Both Aggregators and Processors analyze metrics as they pass through Telegraf. Both Aggregators and Processors analyze metrics as they pass through Telegraf.
Use [measurement filtering](CONFIGURATION.md#measurement-filtering)
to control which metrics are passed through a processor or aggregator. If a
metric is filtered out the metric bypasses the plugin and is passed downstream
to the next plugin.
**Processor** plugins process metrics as they pass through and immediately emit **Processor** plugins process metrics as they pass through and immediately emit
results based on the values they process. For example, this could be printing results based on the values they process. For example, this could be printing
all metrics or adding a tag to all metrics that pass through. all metrics or adding a tag to all metrics that pass through.

View File

@ -98,9 +98,13 @@ you can configure that here.
* **name_suffix**: Specifies a suffix to attach to the measurement name. * **name_suffix**: Specifies a suffix to attach to the measurement name.
* **tags**: A map of tags to apply to a specific input's measurements. * **tags**: A map of tags to apply to a specific input's measurements.
The [measurement filtering](#measurement-filtering) parameters can be used to
limit what metrics are emitted from the input plugin.
## Output Configuration ## Output Configuration
There are no generic configuration options available for all outputs. The [measurement filtering](#measurement-filtering) parameters can be used to
limit what metrics are emitted from the output plugin.
## Aggregator Configuration ## Aggregator Configuration
@ -121,6 +125,10 @@ aggregator and will not get sent to the output plugins.
* **name_suffix**: Specifies a suffix to attach to the measurement name. * **name_suffix**: Specifies a suffix to attach to the measurement name.
* **tags**: A map of tags to apply to a specific input's measurements. * **tags**: A map of tags to apply to a specific input's measurements.
The [measurement filtering](#measurement-filtering) parameters be used to
limit what metrics are handled by the aggregator. Excluded metrics are passed
downstream to the next aggregator.
## Processor Configuration ## Processor Configuration
The following config parameters are available for all processors: The following config parameters are available for all processors:
@ -128,6 +136,10 @@ The following config parameters are available for all processors:
* **order**: This is the order in which the processor(s) get executed. If this * **order**: This is the order in which the processor(s) get executed. If this
is not specified then processor execution order will be random. is not specified then processor execution order will be random.
The [measurement filtering](#measurement-filtering) can parameters may be used
to limit what metrics are handled by the processor. Excluded metrics are
passed downstream to the next processor.
#### Measurement Filtering #### Measurement Filtering
Filters can be configured per input, output, processor, or aggregator, Filters can be configured per input, output, processor, or aggregator,
@ -377,3 +389,15 @@ to the system load metrics due to the `namepass` parameter.
[[outputs.file]] [[outputs.file]]
files = ["stdout"] files = ["stdout"]
``` ```
#### Processor Configuration Examples:
Print only the metrics with `cpu` as the measurement name, all metrics are
passed to the output:
```toml
[[processors.printer]]
namepass = "cpu"
[[outputs.file]]
files = ["/tmp/metrics.out"]
```