diff --git a/pipeline/processors/labels.md b/pipeline/processors/labels.md index e182c739a..d114cbc55 100644 --- a/pipeline/processors/labels.md +++ b/pipeline/processors/labels.md @@ -1,32 +1,28 @@ # Labels -The **labels** processor lets you manipulate the labels of metrics. -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. +The _labels_ processor lets you manipulate the labels of metrics. + +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. {% hint style="info" %} -**Note:** Both processors and this specific component can be enabled only by using -the YAML configuration format. Classic mode configuration format doesn't support -processors. +Only [YAML configuration files](../administration/configuring-fluent-bit/yaml/README.md) support processors. {% endhint %} -## Configuration Parameters +## Configuration parameters -| Key | Description | -| :----- | :---------- | -| 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. | -| insert | Insert a new key with a value into metrics. The key/value pair is required. | -| 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. | -| 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. | -| 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. | +| Key | Description | +| --- | ----------- | +| `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. | +| `insert` | Inserts a new key with a value into metrics. The key/value pair is required. | +| `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. | +| `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. | +| `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. | -#### Update example +### Update example -Change the value of the `name` to `fluentbit`: +The following example changes the value of the `name` key to `fluentbit`: {% tabs %} {% tab title="fluent-bit.yaml" %} @@ -35,7 +31,7 @@ Change the value of the `name` to `fluentbit`: pipeline: inputs: - name: fluentbit_metrics - + processors: metrics: - name: labels @@ -48,10 +44,9 @@ pipeline: {% endtab %} {% endtabs %} -#### Insert example +### Insert example -The following example appends the key `agent` with the value `fluentbit` as the label -of metrics: +The following example appends the key `agent` with the value `fluentbit` as the label of metrics: {% tabs %} {% tab title="fluent-bit.yaml" %} @@ -60,12 +55,12 @@ of metrics: pipeline: inputs: - name: fluentbit_metrics - + processors: metrics: - name: labels insert: agent fluentbit - + outputs: - name : stdout match: '*' @@ -74,9 +69,9 @@ pipeline: {% endtab %} {% endtabs %} -#### Upsert example +### Upsert example -Upsert the value of `name` and insert `fluentbit`: +The following example upserts the value of `name` and inserts `fluentbit`: {% tabs %} {% tab title="fluent-bit.yaml" %} @@ -85,7 +80,7 @@ Upsert the value of `name` and insert `fluentbit`: pipeline: inputs: - name: fluentbit_metrics - + processors: metrics: - name: labels @@ -98,9 +93,9 @@ pipeline: {% endtab %} {% endtabs %} -#### Delete example +### Delete example -Delete containing `name` key from metrics: +The following example deletes the `name` key from metrics: {% tabs %} {% tab title="fluent-bit.yaml" %} @@ -109,7 +104,7 @@ Delete containing `name` key from metrics: pipeline: inputs: - name: fluentbit_metrics - + processors: metrics: - name: labels @@ -122,9 +117,9 @@ pipeline: {% endtab %} {% endtabs %} -#### Hash example +### Hash example -Apply the SHA-1 algorithm for the value of the key `hostname`: +The following example applies the SHA-1 algorithm for the value of the key `hostname`: {% tabs %} {% tab title="fluent-bit.yaml" %} @@ -133,7 +128,7 @@ Apply the SHA-1 algorithm for the value of the key `hostname`: pipeline: inputs: - name: fluentbit_metrics - + processors: metrics: - name: labels @@ -144,4 +139,4 @@ pipeline: ``` {% endtab %} -{% endtabs %} \ No newline at end of file +{% endtabs %} diff --git a/vale-styles/FluentBit/Spelling-exceptions.txt b/vale-styles/FluentBit/Spelling-exceptions.txt index 0d5c27630..3cec69673 100644 --- a/vale-styles/FluentBit/Spelling-exceptions.txt +++ b/vale-styles/FluentBit/Spelling-exceptions.txt @@ -202,6 +202,7 @@ Unary unmuted unsort upsert +upserts UUIDs Vectra Vercel