Skip to content

Commit ee3d7f9

Browse files
authored
Fix istio rate discrepancy in Grafana (#2418)
1 parent b8f648f commit ee3d7f9

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

manager/manifests/prometheus-monitoring.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ spec:
138138
apiVersion: monitoring.coreos.com/v1
139139
kind: PodMonitor
140140
metadata:
141-
name: istio-stats
141+
name: istio-ingress-stats
142142
namespace: prometheus
143143
labels:
144144
monitoring.cortex.dev: "istio"
@@ -150,7 +150,7 @@ spec:
150150
- { key: release, operator: In, values: [ "istio" ]}
151151
namespaceSelector:
152152
any: true
153-
jobLabel: envoy-stats
153+
jobLabel: istio-ingress-stats
154154
podMetricsEndpoints:
155155
- path: /stats/prometheus
156156
interval: 15s
@@ -173,6 +173,11 @@ spec:
173173
- sourceLabels: [ __meta_kubernetes_pod_name ]
174174
action: replace
175175
targetLabel: pod_name
176+
- sourceLabels: [ __name__, __meta_kubernetes_pod_label_istio, __meta_kubernetes_pod_name ]
177+
action: replace
178+
regex: (istio_requests_total)?;(ingressgateway-apis)?;(.+)
179+
replacement: $3
180+
targetLabel: istioingress_podname
176181
metricRelabelings:
177182
- action: keep
178183
sourceLabels: [__name__]
@@ -183,7 +188,7 @@ spec:
183188
request_duration_milliseconds_count\
184189
)"
185190
- action: labelkeep
186-
regex: (__name__|destination_service|response_code|le)
191+
regex: (__name__|destination_service|response_code|le|istioingress_podname)
187192

188193
---
189194

0 commit comments

Comments
 (0)