繁体   English   中英

如何将 Istio 与 Prometheus 集成

[英]How to integrate Istio with Prometheus

我需要做一个关于使用 Istio + Prometheus 收集 k8s 应用程序指标的 POC。 我的普罗米修斯在虚拟机上运行。 我不想在 kubernetes 中将 Prometheus 作为容器运行。
任何人都可以帮助我获得正确的文档吗? 或者建议我如何在不将 prometheus 作为 k8s 中的 pod 运行的情况下做到这一点?

您可以在helm中更新配置映射,并且 istio 适配器会处理其他内容。

您可以在此github 问题中找到更多详细信息


看看这个例子

您可以通过三个快速步骤将自己的 Prometheus 带到 Istio。

  • 首先,更新您的 Prometheus 配置。 Prometheus 依赖于抓取配置 model,其中目标代表 /metrics 端点,由 Prometheus 服务器摄取。
  • 其次,更新您的 Prometheus 部署以将 Istio 的证书挂载到 Prometheus 中。 这允许 Prometheus 在启用双向 TLS 时抓取 Istio 工作负载。 为此,将 istio.default 秘密挂载到您的 Prometheus 部署 YAML
  • 最后,更新 Istio 的配置以使用自定义的 Prometheus 地址。

如果你:

您可以使用 istio 发行版中的 \samples\addons\extras\prometheus-operator.yaml将退出的 Prometheus 安装与 Istio 连接起来。

kubectl apply -n istio-system -f prometheus-operator.yaml

并检查https://prometheus.example.com/service-discovery

podMonitor/istio-system/envoy-stats-monitor/0 (8 / 115 active targets)
serviceMonitor/istio-system/istio-component-monitor/0 (1 / 98 active targets)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM