-
Notifications
You must be signed in to change notification settings - Fork 439
/
Copy pathdefault.yml
38 lines (38 loc) · 1.43 KB
/
default.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
description: Pipeline for processing Prometheus remote_write metrics.
processors:
- append:
field: "prometheus.labels.metrics_names"
value: [null]
allow_duplicates: false
description: Create an empty field of the object type to temporarily store list of all metrics names
- foreach:
if: ctx.prometheus?.metrics != null
field: "prometheus.metrics"
processor:
append:
field: "prometheus.labels.metrics_names"
value: ["{{_ingest._key}}"]
description: Add all keys of the 'prometheus' object to the earlier created field, it includes all metric names in 'prometheus.metrics' object
- foreach:
if: ctx.prometheus?.metrics == null
field: "prometheus"
processor:
append:
field: "prometheus.labels.metrics_names"
value: ["{{_ingest._key}}"]
description: Add all keys of the 'prometheus' object to the earlier created field, it includes all metric names and key "labels"
- fingerprint:
fields: ["prometheus.labels"]
target_field: "prometheus.labels_fingerprint"
ignore_missing: true
- remove:
field: "prometheus.labels.metrics_names"
description: Remove field as it contains a redundant information and can impact the documents size
on_failure:
- set:
field: event.kind
value: pipeline_error
- append:
field: error.message
value: '{{{ _ingest.on_failure_message }}}'