Skip to content

Commit 6eee081

Browse files
Merge pull request #1933 from fluent/alexakreizinger/sc-136287/update-fluent-bit-docs-pipeline-processors
2 parents e103bdb + 4692e18 commit 6eee081

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

pipeline/processors/metrics-selector.md

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
1-
# Metrics Selector
1+
# Metrics selector
22

3-
The _Metrics Selector_ processor lets you choose which metrics to include or exclude, similar to the [Grep](../pipeline/filters/grep) filter for logs.
3+
The _metrics selector_ processor lets you choose which metrics to include or exclude, similar to the [grep](../pipeline/filters/grep) filter for logs.
44

55
<img referrerpolicy="no-referrer-when-downgrade" src="https://static.scarf.sh/a.png?x-pxid=326269f3-cfea-472d-9169-1de32c142b90" />
66

77
## Configuration parameters
88

9-
The Metrics Selector processor supports the following configuration parameters:
9+
The metrics selector processor supports the following configuration parameters:
1010

11-
| Key | Description | Default |
12-
| :---------- | :--- | :--- |
13-
| `metric_name` | The string that determines which metrics are affected by this processor, depending on the active [matching operation](#matching-operations). | |
11+
| Key | Description | Default |
12+
| --- | ----------- | ------- |
13+
| `metric_name` | The string that determines which metrics are affected by this processor, depending on the active [matching operation](#matching-operations). | _none_ |
1414
| `context` | Specifies matching context. Possible values: `metric_name` or `delete_label`. | `metrics_name` |
15-
| `action` | Specifies whether to include or exclude matching metrics. Possible values: `INCLUDE` or `EXCLUDE`. | |
16-
| `operation_type` | Specifies the [matching operation](#matching-operations) to apply to the value of `metric_name`. Possible values: `PREFIX` or `SUBSTRING`. | |
17-
| `label` | Specifies a label key and value pair. | |
15+
| `action` | Specifies whether to include or exclude matching metrics. Possible values: `INCLUDE` or `EXCLUDE`. | _none_ |
16+
| `operation_type` | Specifies the [matching operation](#matching-operations) to apply to the value of `metric_name`. Possible values: `PREFIX` or `SUBSTRING`. | _none_ |
17+
| `label` | Specifies a label key and value pair. | _none_ |
1818

1919
## Matching operations
2020

21-
The Metrics Selector processor has two matching operations: prefix matching and substring matching.
21+
The metrics selector processor has these matching operations: prefix matching and substring matching.
2222

2323
### Prefix matching
2424

25-
Prefix matching compares the value of `metric_name` to the beginning of each incoming metric name. For example, `metric_name: fluentbit_input` results in a match for metrics named `fluentbit_input_records`, but not for metrics named `total_fluentbit_input`.
25+
Prefix matching compares the value of `metric_name` to the beginning of each incoming metric name. For example, the value `fluentbit_input` results in a match for metrics named `fluentbit_input_records`, but not for metrics named `total_fluentbit_input`.
2626

27-
If no `operation_type` value is specified and the value of `metric_name` is a standard string, the Metrics Selector processor defaults to prefix matching.
27+
If no `operation_type` value is specified, and if the value of `metric_name` is a standard string, the metrics selector processor defaults to prefix matching.
2828

2929
### Substring matching
3030

31-
Substring matching treats the value of `metric_name` as a regex pattern, and compares this pattern against each incoming metric name accordingly. This pattern can appear anywhere within the name of the incoming metric. For example, `metric_name: bytes` results in a match for metrics named `bytes_total` and metrics named `input_bytes_count`.
31+
Substring matching treats the value of `metric_name` as a regular expression pattern, and compares this pattern against each incoming metric name accordingly. This pattern can appear anywhere within the name of the incoming metric. For example, the value `bytes` results in a match for both metrics named `bytes_total` and metrics named `input_bytes_count`.
3232

33-
If the value of `metric_name` is a string wrapped in forward slashes (for example, `metric_name: /storage..*/`), the Metrics Selector processor defaults to substring matching, regardless of whether an `operation_type` value is specified. This means that a `metric_name` value wrapped in forward slashes will always use substring matching, even if `operation_type` is set to `PREFIX`.
33+
If the value of `metric_name` is a string wrapped in forward slashes (for example, `metric_name: /storage..*/`), the metrics selector processor defaults to substring matching, regardless of whether an `operation_type` value is specified. This means that a `metric_name` value wrapped in forward slashes will always use substring matching, even if `operation_type` is set to `PREFIX`.
3434

3535
However, if `operation_type` is explicitly set to `SUBSTRING`, you don't need to wrap the value of `metric_name` in forward slashes.
3636

3737
## Configuration examples
3838

39-
The following examples show possible configurations of the Metrics Selector processor.
39+
The following examples show possible configurations of the metrics selector processor.
4040

4141
### Without `context`
4242

@@ -93,7 +93,6 @@ pipeline:
9393
- name: labels
9494
delete: name
9595
96-
9796
outputs:
9897
- name: stdout
9998
match: '*'

0 commit comments

Comments
 (0)