Skip to content

Commit 1297fd9

Browse files
pipeline: processors: labels: general cleanup
Signed-off-by: Alexa Kreizinger <[email protected]>
1 parent dd02c0a commit 1297fd9

File tree

2 files changed

+30
-34
lines changed

2 files changed

+30
-34
lines changed

pipeline/processors/labels.md

Lines changed: 29 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,28 @@
11
# Labels
2-
The **labels** processor lets you manipulate the labels of metrics.
32

4-
Similar to filters, this processor presents a enriching/modifying mechanism to
5-
perform operations for labels manipulation. The most significant difference is
6-
that processors perform better than filters, and when chaining them there are no
7-
encoding or decoding performance penalties.
3+
The _labels_ processor lets you manipulate the labels of metrics.
4+
5+
Similar to filters, this processor presents a enriching/modifying mechanism to perform operations for labels manipulation. The most significant difference is that processors perform better than filters, and when chaining them there are no encoding or decoding performance penalties.
86

97
{% hint style="info" %}
108

11-
**Note:** Both processors and this specific component can be enabled only by using
12-
the YAML configuration format. Classic mode configuration format doesn't support
13-
processors.
9+
Only [YAML configuration files](../administration/configuring-fluent-bit/yaml/README.md) support processors.
1410

1511
{% endhint %}
1612

17-
## Configuration Parameters
13+
## Configuration parameters
1814

19-
| Key | Description |
20-
| :----- | :---------- |
21-
| update | Update an existing key with a value into metrics. The key/value pair is required. If the specified key doesn't exist, the operation silently fails and has no effect. |
22-
| insert | Insert a new key with a value into metrics. The key/value pair is required. |
23-
| upsert | Upsert a specific key with a value, the `upsert` operation will try to update the value of the key. If the key does not exist, the key will be created. The key-value pair is required. |
24-
| delete | Delete a key from the labels of metrics. The key/value pair is required. If the specified key doesn't exist, the operation silently fails and has no effect. |
25-
| hash | Replace the key value with a hash generated by the SHA-256 algorithm from the specified label name. The generated binary value is set as a hex string. |
15+
| Key | Description |
16+
| --- | ----------- |
17+
| `update` | Updates an existing key with a value into metrics. The key/value pair is required. If the specified key doesn't exist, the operation silently fails and has no effect. |
18+
| `insert` | Inserts a new key with a value into metrics. The key/value pair is required. |
19+
| `upsert` | Upserts a specific key with a value, the `upsert` operation will try to update the value of the key. If the specified key doesn't exist, a new key will be created. The key/value pair is required. |
20+
| `delete` | Deletes a key from the labels of metrics. The key/value pair is required. If the specified key doesn't exist, the operation silently fails and has no effect. |
21+
| `hash` | Replaces the key value with a hash generated by the SHA-256 algorithm from the specified label name. The generated binary value is set as a hex string. |
2622

27-
#### Update example
23+
### Update example
2824

29-
Change the value of the `name` to `fluentbit`:
25+
The following example changes the value of the `name` key to `fluentbit`:
3026

3127
{% tabs %}
3228
{% tab title="fluent-bit.yaml" %}
@@ -35,7 +31,7 @@ Change the value of the `name` to `fluentbit`:
3531
pipeline:
3632
inputs:
3733
- name: fluentbit_metrics
38-
34+
3935
processors:
4036
metrics:
4137
- name: labels
@@ -48,10 +44,9 @@ pipeline:
4844
{% endtab %}
4945
{% endtabs %}
5046
51-
#### Insert example
47+
### Insert example
5248
53-
The following example appends the key `agent` with the value `fluentbit` as the label
54-
of metrics:
49+
The following example appends the key `agent` with the value `fluentbit` as the label of metrics:
5550

5651
{% tabs %}
5752
{% tab title="fluent-bit.yaml" %}
@@ -60,12 +55,12 @@ of metrics:
6055
pipeline:
6156
inputs:
6257
- name: fluentbit_metrics
63-
58+
6459
processors:
6560
metrics:
6661
- name: labels
6762
insert: agent fluentbit
68-
63+
6964
outputs:
7065
- name : stdout
7166
match: '*'
@@ -74,9 +69,9 @@ pipeline:
7469
{% endtab %}
7570
{% endtabs %}
7671

77-
#### Upsert example
72+
### Upsert example
7873

79-
Upsert the value of `name` and insert `fluentbit`:
74+
The following example upserts the value of `name` and inserts `fluentbit`:
8075

8176
{% tabs %}
8277
{% tab title="fluent-bit.yaml" %}
@@ -85,7 +80,7 @@ Upsert the value of `name` and insert `fluentbit`:
8580
pipeline:
8681
inputs:
8782
- name: fluentbit_metrics
88-
83+
8984
processors:
9085
metrics:
9186
- name: labels
@@ -98,9 +93,9 @@ pipeline:
9893
{% endtab %}
9994
{% endtabs %}
10095

101-
#### Delete example
96+
### Delete example
10297

103-
Delete containing `name` key from metrics:
98+
The following example deletes the `name` key from metrics:
10499

105100
{% tabs %}
106101
{% tab title="fluent-bit.yaml" %}
@@ -109,7 +104,7 @@ Delete containing `name` key from metrics:
109104
pipeline:
110105
inputs:
111106
- name: fluentbit_metrics
112-
107+
113108
processors:
114109
metrics:
115110
- name: labels
@@ -122,9 +117,9 @@ pipeline:
122117
{% endtab %}
123118
{% endtabs %}
124119

125-
#### Hash example
120+
### Hash example
126121

127-
Apply the SHA-1 algorithm for the value of the key `hostname`:
122+
The following example applies the SHA-1 algorithm for the value of the key `hostname`:
128123

129124
{% tabs %}
130125
{% tab title="fluent-bit.yaml" %}
@@ -133,7 +128,7 @@ Apply the SHA-1 algorithm for the value of the key `hostname`:
133128
pipeline:
134129
inputs:
135130
- name: fluentbit_metrics
136-
131+
137132
processors:
138133
metrics:
139134
- name: labels
@@ -144,4 +139,4 @@ pipeline:
144139
```
145140

146141
{% endtab %}
147-
{% endtabs %}
142+
{% endtabs %}

vale-styles/FluentBit/Spelling-exceptions.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ Unary
202202
unmuted
203203
unsort
204204
upsert
205+
upserts
205206
UUIDs
206207
Vectra
207208
Vercel

0 commit comments

Comments
 (0)