mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
3a444bb7bb
These actions may be useful for filtering out unneeded targets and/or metrics if they contain equal label values. For example, the following rule would leave the target only if __meta_kubernetes_annotation_prometheus_io_port equals __meta_kubernetes_pod_container_port_number: - action: keep_if_equal source_labels: [__meta_kubernetes_annotation_prometheus_io_port, __meta_kubernetes_pod_container_port_number]
24 lines
501 B
YAML
24 lines
501 B
YAML
- target_label: bar
|
|
- source_labels: [aa]
|
|
separator: "foobar"
|
|
regex: "foo.+bar"
|
|
target_label: aaa
|
|
replacement: "xxx"
|
|
- action: keep
|
|
source_labels: [aaa]
|
|
- action: drop
|
|
source_labels: [aaa]
|
|
- action: hashmod
|
|
source_labels: [aaa]
|
|
target_label: aaa
|
|
modulus: 234
|
|
- action: replace_all
|
|
source_labels: [aa]
|
|
target_label: bb
|
|
- action: labelmap_all
|
|
regex: "\\."
|
|
replacement: ":"
|
|
- action: keep_if_equal
|
|
source_labels: [foo, bar]
|
|
- action: drop_if_equal
|
|
source_labels: [foo, bar]
|