From 33a6b7a2f7a10fefd275c9d03d2cbf1f2d7eb3a9 Mon Sep 17 00:00:00 2001 From: Hiroshi Hatake Date: Fri, 10 May 2024 18:18:34 +0900 Subject: [PATCH] processor_label_value: Add label parameter description and add example configuration for delete_label_value operation Signed-off-by: Hiroshi Hatake --- pipeline/processors/metrics-selector.md | 32 ++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/pipeline/processors/metrics-selector.md b/pipeline/processors/metrics-selector.md index 962577ad..0541d72f 100644 --- a/pipeline/processors/metrics-selector.md +++ b/pipeline/processors/metrics-selector.md @@ -9,9 +9,10 @@ The native processor plugin supports the following configuration parameters: | Key | Description | Default | | :---------- | :--- | :--- | | Metric\_Name | Keep metrics in which the metric of name matches with the actual name or the regular expression. | | -| Context | Specify matching context. Currently, metric_name is only supported. | `Metrics_Name` | +| Context | Specify matching context. Currently, metric\_name and delete\_label\_value are only supported. | `Metrics_Name` | | Action | Specify the action for specified metrics. INCLUDE and EXCLUDE are allowed. | | | Operation\_Type | Specify the operation type of action for metrics payloads. PREFIX and SUBSTRING are allowed. | | +| Label | Specify a label key and value pair. | | ## Configuration Examples @@ -44,6 +45,35 @@ pipeline: delete: name + outputs: + - name: stdout + match: '*' +``` +{% endtab %} + +{% tab title="context-delete\_label\_value.yaml" %} +```yaml +service: + flush: 5 + daemon: off + log_level: info + +pipeline: + inputs: + - name: fluentbit_metrics + tag: fluentbit.metrics + scrape_interval: 10 + + processors: + metrics: + - name: metrics_selector + context: delete_label_value + label: name stdout.0 + + - name: labels + delete: name + + outputs: - name: stdout match: '*'