Sync #13803 into Chinese (#13804)

This commit is contained in:
Wilson Wu 2023-09-02 10:10:20 +08:00 committed by GitHub
parent 1f1b24b797
commit d3f5566ec4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 11 deletions

View File

@ -3,17 +3,14 @@ title: 我可以使用 Prometheus 配合 Istio 抓取应用程序指标吗?
weight: 90
---
是的。Istio 附带 [Prometheus 的配置]({{< github_file >}}/manifests/charts/istio-telemetry/prometheus/templates/configmap.yaml),在启用或禁用双向 TLS 时启动收集应用程序指标的功能。
`kubernetes-pods` job 从没有双向 TLS 环境中的 pod 收集应用程序指标。当为 Istio 启用双向 TLS 时,`kubernetes-pods-istio-secure` job 从应用程序的 pod 中收集指标。
这两个 job 都要求将以下注释添加到需要从中收集应用程序指标的所有 deployment 中:
- `prometheus.io/scrape: "true"`
- `prometheus.io/path: "<metrics path>"`
- `prometheus.io/port: "<metrics port>"`
是的。[Prometheus](https://prometheus.io/) 是一款开源监控系统和时间序列数据库。
您可以将 Prometheus 与 Istio 结合使用来记录跟踪 Istio 和服务网格内应用程序运行状况的指标。
您可以使用 [Grafana](/zh/docs/ops/integrations/grafana/) 和
[Kiali](/zh/docs/tasks/observability/kiali/) 等工具对指标进行可视化。
请参阅 [Prometheus 配置](/zh/docs/ops/integrations/prometheus/#Configuration)以了解如何启用指标收集。
一些注意事项:
- 如果 Prometheus pod 在 Istio Citadel pod 生成所需证书并将其分发给 Prometheus 之前启动,则 Prometheus pod 需要重启以便收集双向 TLS 保护的目标信息。
- 如果您的应用程序在专用端口上公开了 Prometheus 指标,则应将该端口添加到 service 和 deployment 规范中。
- 如果 Prometheus Pod 在 Istio Citadel Pod 生成所需证书并将其分发给 Prometheus 之前启动,
则 Prometheus pod 需要重启以便收集双向 TLS 保护的目标信息。
- 如果您的应用程序在专用端口上公开了 Prometheus 指标,则应将该端口添加到 Service 和 Deployment 规范中。