Skip to content

Commit

Permalink
Clarify what it means to filter metrics from processors
Browse files Browse the repository at this point in the history
  • Loading branch information
danielnelson committed Oct 30, 2017
1 parent c116af3 commit 777b84d
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
5 changes: 5 additions & 0 deletions docs/AGGREGATORS_AND_PROCESSORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
26 changes: 25 additions & 1 deletion docs/CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -121,13 +125,21 @@ 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:

* **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,
Expand Down Expand Up @@ -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"]
```

0 comments on commit 777b84d

Please sign in to comment.