alertmanager远程配置

用于远程配置alertmanager的rules。

主要步骤为:

  • 通过proxy更新mount的告警规则文件
  • 重启容器
# ./client -h

Note: Only for update existed rule group!
Usage: server [options...]
Options:
  -h    help
  -rulefile string
        rule file
  -show string
        use 'show all' to show all rule groups; use 'show ${rule_group_name}' to show detail info of a rule group
  -t string
        target
# ./client --show all -t 127.0.0.1:20000
<----Show Rule Groups---->
exporter.rules
node.rules
# ./client --show node.rules -t 127.0.0.1:20000
groups:
- name: node.rules
  rules:
  - alert: nodeCpuLoadPressure
    expr: node_load15{} > 0.80
    for: 15m
    labels:
      severity: warning
    annotations:
      description: Ali node cpu_load15 {{ $labels.instance }} value {{ $value }}
      summary: cpu_load15 > 0.80
......

 

参见:https://github.com/woodliu/alertmanagerProxy

posted @ 2019-12-31 13:49  charlieroro  阅读(357)  评论(0编辑  收藏  举报