Skip to content

Commit

Permalink
Simplify regexp's (grafana#1202)
Browse files Browse the repository at this point in the history
This is mostly to remove redundant anchoring (as it makes people
believe that Prometheus's regexp's aren't anchored by default, which
will backfire badly at some point), but it also removes useless
grouping (again to avoid confusion).

Signed-off-by: beorn7 <[email protected]>
  • Loading branch information
beorn7 authored and cyriltovena committed Oct 28, 2019
1 parent 72bb22c commit 6b10f76
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions production/helm/promtail/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ data:
- __meta_kubernetes_pod_node_name
target_label: __host__
- action: drop
regex: ^$
regex: ''
source_labels:
- __service__
- action: labelmap
Expand Down Expand Up @@ -75,7 +75,7 @@ data:
- __meta_kubernetes_pod_node_name
target_label: __host__
- action: drop
regex: ^$
regex: ''
source_labels:
- __service__
- action: labelmap
Expand Down Expand Up @@ -118,7 +118,7 @@ data:
- __meta_kubernetes_pod_label_name
- __meta_kubernetes_pod_label_app
- action: drop
regex: ^([0-9a-z-.]+)(-[0-9a-f]{8,10})$
regex: '[0-9a-z-.]+-[0-9a-f]{8,10}'
source_labels:
- __meta_kubernetes_pod_controller_name
- source_labels:
Expand All @@ -128,7 +128,7 @@ data:
- __meta_kubernetes_pod_node_name
target_label: __host__
- action: drop
regex: ^$
regex: ''
source_labels:
- __service__
- action: labelmap
Expand Down Expand Up @@ -171,19 +171,19 @@ data:
- __meta_kubernetes_pod_label_name
- __meta_kubernetes_pod_label_app
- action: keep
regex: ^([0-9a-z-.]+)(-[0-9a-f]{8,10})$
regex: '[0-9a-z-.]+-[0-9a-f]{8,10}'
source_labels:
- __meta_kubernetes_pod_controller_name
- action: replace
regex: ^([0-9a-z-.]+)(-[0-9a-f]{8,10})$
regex: '([0-9a-z-.]+)-[0-9a-f]{8,10}'
source_labels:
- __meta_kubernetes_pod_controller_name
target_label: __service__
- source_labels:
- __meta_kubernetes_pod_node_name
target_label: __host__
- action: drop
regex: ^$
regex: ''
source_labels:
- __service__
- action: labelmap
Expand Down Expand Up @@ -220,7 +220,7 @@ data:
- role: pod
relabel_configs:
- action: drop
regex: ^$
regex: ''
source_labels:
- __meta_kubernetes_pod_annotation_kubernetes_io_config_mirror
- action: replace
Expand All @@ -231,7 +231,7 @@ data:
- __meta_kubernetes_pod_node_name
target_label: __host__
- action: drop
regex: ^$
regex: ''
source_labels:
- __service__
- action: labelmap
Expand Down

0 comments on commit 6b10f76

Please sign in to comment.