6.4.2. 设置 Prometheus

注意

在 OpenShift Container Platform 3.11 上运行 AMQ Streams 时,请使用以下步骤。

Prometheus 为系统监控和警报通知提供一套开源的组件。

此处我们介绍了如何在将 AMQ Streams 部署到 OpenShift Container Platform 3.11 时,如何使用提供的 Prometheus 镜像和配置文件来运行和管理 Prometheus 服务器。

先决条件

  • 您已将 Prometheus 和 Grafana 的兼容版本部署到 OpenShift Container Platform 3.11 集群中。
  • 用于运行 Prometheus 服务器 pod 的服务帐户有权访问 OpenShift API 服务器。这允许服务帐户检索集群中获取指标的 pod 列表。

    如需更多信息,请参阅 发现服务

6.4.2.1. Prometheus 配置

AMQ Streams 为 Prometheus 服务器提供了示例配置文件

为部署提供了一个 Prometheus 镜像:

  • prometheus.yaml

以下文件中还提供了与 Prometheus 相关的其他配置:

  • prometheus-additional.yaml
  • prometheus-rules.yaml
  • strimzi-pod-monitor.yaml

若要让 Prometheus 获取监控数据,您必须已将 Prometheus 的兼容版本部署到 OpenShift Container Platform 3.11 集群中。

然后,使用配置文件来部署 Prometheus