cat >> grafana_configmap.yaml << EOF
apiVersion: v1
kind: ConfigMap
metadata:
  name: grafana-config
  namespace: kube-system
data:
  grafana.ini: |
    [server]
    [smtp]
    enabled = true
    host = smtp.163.com:465
    user = xxx@163.com
    password = <邮箱授权密码>
    skip_verify = true
    from_address = <发件人邮箱>
    [alerting]
    enabled = true
    execute_alerts = true
EOF

添加报警方式

Grafana-(3).报警

配置报警规则

Grafana-(3).报警

Conditions 是作为 报警阈值的 设置项

WHEN 之后 选择阈值的选取形式

Query(A,1m,now) 查询公式

其中的 A 就是我们在创建 Graph Metrics选项卡的 设置的第一个查询公式

1m 代表的是 取1分钟内的数据

IS ABOVE 数值比较的选项,后面就是报警的触发阈值了,当大于0.2的时候 就会发出报警到 Pagerduty

Grafana-(3).报警

发送配置

notifification 设置报警发送到什么地方

Grafana-(3).报警

测试报警规则

Grafana-(3).报警

Grafana-(3).报警

相关文章:

  • 2022-02-27
  • 2021-05-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-02-17
  • 2021-12-26
  • 2022-02-03
  • 2021-07-27
  • 2021-11-28
  • 2021-07-12
相关资源
相似解决方案