1.3.4. 删除默认指标
如果您不需要收集管理集群中的特定指标数据,从 observability-metrics-custom-allowlist.yaml 文件中删除相应的指标。当您删除指标时,不会在受管集群上收集指标数据。如前文所述,首先验证 mco observability 是否已启用。
您可以在 metrics 名称的开头使用连字符 - 将默认指标名称添加到 metrics_list.yaml 参数中。例如: -cluster_infrastructure_provider。
使用以下命令,在 open-cluster-management-observability 命名空间中创建 observability-metrics-custom-allowlist ConfigMap:oc apply -n open-cluster-management-observability -f observability-metrics-custom-allowlist.yaml。
验证特定指标是否没有从受管集群中收集。当您从 Grafana 仪表板查询指标时,指标不会显示。