prometheus之alterManager配置文件详解

全球:
  smtp_smarthost: 'smtp.qq.com:465'
  smtp_from: '[email protected]'
  smtp_auth_username: '[email protected]'
  smtp_auth_password: 'snfdmoqrshbfbjjj'
  smtp_require_tls:假
模板:
  - “在/ usr /本地/ alertmanager- 0.15.0-rc.1.linux-amd64 / template / * .tmpl'route

  group_by:['alertname','cluster','service'] 
  group_wait:30s
  group_interval:5m
  repeat_interval:3h 
  receiver:receiver1
    routes:
#正则匹配
- match_re:
      service:^(foo1 | foo2 | baz)$
    receiver:receiver1#无法匹配到父节点      routes:    - match:    #根据报警级别来设置接收者      严重性:警告





      receiver:receiver1
    - match:
   #匹配服务来设置接收者
      服务:文件
    receiver:receiver2
 路由:
    - match:
        严重性:critical
      receiver:receiver2

   抑制规则制定inhibit_rules:
    - source_match:
      severity:'critical'target_match
    :
      severity:'warning '
  #如果警报名称相同,则应用抑制

    等于:['alertname','cluster','service']

#接受

   接收器:

    #接受名称跟上面发送规则里的接收器对应

    - name:'receiver1'email_configs
   :#接受者
    - to:
   '[email protected]'webhook_configs:#发送的接口
    - send_resolved:true

      网址:“http://10.5.96.210:8080/email/sendCode”

    - 名称:'receiver2'email_configs
     :

    - 致:'[email protected]'

   webhook_configs:Alertmanager将下面的JSON格式发送HTTP POST请求到配置的端点:

{
  "version": "4",
  "groupKey": ,    // key identifying the group of alerts (e.g. to deduplicate)
  "status": "",
  "receiver": ,
  "groupLabels": ,
  "commonLabels": ,
  "commonAnnotations": ,
  "externalURL": ,  // backlink to the Alertmanager.
  "alerts": [
    {
      "labels": ,
      "annotations": ,
      "startsAt": "",
      "endsAt": ""
    },
    ...
  ]
} 
  

本文为个人学习笔记记录,如有错误望指教,特别提醒一点这个yml文件格式必须规范否则会报各种错误。





你可能感兴趣的:(prometheus,java,alertmanager,普罗米修斯)