17.6. DedicatedServiceMonitors

17.6.1. 描述

您可以使用 DedicatedServiceMonitors 资源为 Prometheus Adapter 配置专用 Service Monitors

会出现:K8sPrometheusAdapter

属性类型描述

enabled

bool

enabled 设置为 true 时,Cluster Monitoring Operator (CMO) 会部署一个专门的 Service Monitor,它会公开 kubelet /metrics/resource 端点。此 Service Monitor 会设置 honorTimestamps: true,并只保留与 Prometheus Adapter 的 pod 资源查询相关的指标。另外,Prometheus Adapter 被配置为使用这些专用指标。总体而言,此功能提高了由 oc adm top pod 命令或 Horizontal Pod Autoscaler 使用的基于 Prometheus Adapter 的 CPU 用量测量的一致性。