diff --git a/docs/AGGREGATORS_AND_PROCESSORS.md b/docs/AGGREGATORS_AND_PROCESSORS.md index af4a0e6d0..ffa9c8f7e 100644 --- a/docs/AGGREGATORS_AND_PROCESSORS.md +++ b/docs/AGGREGATORS_AND_PROCESSORS.md @@ -39,6 +39,11 @@ 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 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. diff --git a/docs/CONFIGURATION.md b/docs/CONFIGURATION.md index 6c48d2d84..bf8b4ebf6 100644 --- a/docs/CONFIGURATION.md +++ b/docs/CONFIGURATION.md @@ -98,9 +98,13 @@ you can configure that here. * **name_suffix**: Specifies a suffix to attach to the measurement name. * **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 -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 @@ -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. * **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 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 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 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]] 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"] +```