Kubernetes 如何从istio容器中刮取数据
我正试图使用普罗米修斯从15090港口的Istio特使那里获取数据 我当前的设置是使用istio 1.1.5和独立的Prometheus,而不是随istio附带的 特使侧车连接到不同名称空间中的多个POD,我不知道如何在多个istio代理容器中的特定端口上刮取数据 我试着使用服务监视器从istio特使那里刮取数据,但它不起作用 我当前尝试的服务监视器Kubernetes 如何从istio容器中刮取数据,kubernetes,prometheus,istio,Kubernetes,Prometheus,Istio,我正试图使用普罗米修斯从15090港口的Istio特使那里获取数据 我当前的设置是使用istio 1.1.5和独立的Prometheus,而不是随istio附带的 特使侧车连接到不同名称空间中的多个POD,我不知道如何在多个istio代理容器中的特定端口上刮取数据 我试着使用服务监视器从istio特使那里刮取数据,但它不起作用 我当前尝试的服务监视器 kind: ServiceMonitor metadata: annotations: labels: k8s-app: isti
kind: ServiceMonitor
metadata:
annotations:
labels:
k8s-app: istio
name: envoy
namespace: monitoring
spec:
endpoints:
- interval: 5s
path: /metrics
port: http-envoy-prom
jobLabel: envoy
namespaceSelector:
matchNames:
- istio-system
selector:
matchLabels:
istio: mixer```
can somebody help, how to scrape data from port 15090 on multiple istio-proxy containers attached to multiple pods.
除了ServiceMonitor,您还需要为特使代理创建以下刮取配置
# Scrape config for envoy stats
- job_name: 'envoy-stats'
metrics_path: /stats/prometheus
kubernetes_sd_configs:
- role: pod
relabel_configs:
- source_labels: [__meta_kubernetes_pod_container_port_name]
action: keep
regex: '.*-envoy-prom'
- source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
action: replace
regex: ([^:]+)(?::\d+)?;(\d+)
replacement: $1:15090
target_label: __address__
- action: labelmap
regex: __meta_kubernetes_pod_label_(.+)
- source_labels: [__meta_kubernetes_namespace]
action: replace
target_label: namespace
- source_labels: [__meta_kubernetes_pod_name]
action: replace
target_label: pod_name
metric_relabel_configs:
# Exclude some of the envoy metrics that have massive cardinality
# This list may need to be pruned further moving forward, as informed
# by performance and scalability testing.
- source_labels: [ cluster_name ]
regex: '(outbound|inbound|prometheus_stats).*'
action: drop
- source_labels: [ tcp_prefix ]
regex: '(outbound|inbound|prometheus_stats).*'
action: drop
- source_labels: [ listener_address ]
regex: '(.+)'
action: drop
- source_labels: [ http_conn_manager_listener_prefix ]
regex: '(.+)'
action: drop
- source_labels: [ http_conn_manager_prefix ]
regex: '(.+)'
action: drop
- source_labels: [ __name__ ]
regex: 'envoy_tls.*'
action: drop
- source_labels: [ __name__ ]
regex: 'envoy_tcp_downstream.*'
action: drop
- source_labels: [ __name__ ]
regex: 'envoy_http_(stats|admin).*'
action: drop
- source_labels: [ __name__ ]
regex: 'envoy_cluster_(lb|retry|bind|internal|max|original).*'
action: drop
还是用这个