搜索

5.5. 禁用本地 Alertmanager

download PDF

在 OpenShift Container Platform 监控堆栈的 openshift-monitoring 项目中默认启用从 Prometheus 实例路由警报的本地 Alertmanager。

如果您不需要本地 Alertmanager,可以通过在 openshift-monitoring 项目中配置 cluster-monitoring-config 配置映射来禁用它。

先决条件

  • 您可以使用具有 cluster-admin 集群角色的用户身份访问集群。
  • 您已创建了 cluster-monitoring-config 配置映射。
  • 已安装 OpenShift CLI(oc)。

流程

  1. 编辑 openshift-monitoring 项目中的 cluster-monitoring-config 配置映射:

    $ oc -n openshift-monitoring edit configmap cluster-monitoring-config
  2. data/config.yaml 下为 alertmanagerMain 组件添加 enabled: false

    apiVersion: v1
    kind: ConfigMap
    metadata:
      name: cluster-monitoring-config
      namespace: openshift-monitoring
    data:
      config.yaml: |
        alertmanagerMain:
          enabled: false
  3. 保存文件以使改变生效。应用更改时,Alertmanager 实例会自动禁用。

其他资源

Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.