Skip to content
Snippets Groups Projects
Verified Commit 3427e194 authored by Rafael László's avatar Rafael László :speech_balloon:
Browse files

Add istio monitoring config

parent 61e9a2f4
No related branches found
No related tags found
No related merge requests found
# https://github.com/istio/istio/blob/master/samples/addons/extras/prometheus-operator.yaml
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: istio-components
namespace: istio-system
labels:
monitoring: istio-components
release: istio
spec:
jobLabel: istio
targetLabels: [app]
selector:
matchExpressions:
- {key: istio, operator: In, values: [pilot]}
namespaceSelector:
any: true
endpoints:
- port: http-monitoring
interval: 15s
\ No newline at end of file
# https://github.com/istio/istio/blob/master/samples/addons/extras/prometheus-operator.yaml
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: istio-envoy-stats
namespace: istio-system
labels:
monitoring: istio-proxies
release: istio
spec:
selector:
matchExpressions:
- {key: istio-prometheus-ignore, operator: DoesNotExist}
namespaceSelector:
any: true
jobLabel: envoy-stats
podMetricsEndpoints:
- path: /stats/prometheus
interval: 15s
relabelings:
- action: keep
sourceLabels: [__meta_kubernetes_pod_container_name]
regex: "istio-proxy"
- action: keep
sourceLabels: [__meta_kubernetes_pod_annotationpresent_prometheus_io_scrape]
- sourceLabels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
action: replace
regex: ([^:]+)(?::\d+)?;(\d+)
replacement: $1:$2
targetLabel: __address__
- action: labeldrop
regex: "__meta_kubernetes_pod_label_(.+)"
- sourceLabels: [__meta_kubernetes_namespace]
action: replace
targetLabel: namespace
- sourceLabels: [__meta_kubernetes_pod_name]
action: replace
targetLabel: pod_name
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment