metalmatze / alertmanager-bot

[deprecated] Bot for Prometheus' Alertmanager
MIT License
660 stars 148 forks source link

Missing host/summary from alert message #110

Closed yangm97 closed 4 years ago

yangm97 commented 4 years ago

Sample from prometheus.yml:

scrape_configs:
  - job_name: 'node_exporter'
    static_configs:
      - targets:
        - '[ipv6:literal:here]:9100'
        - '[another:ipv6:literal:here]:9100'

Sample from alert_rules.yml:

groups:
- name: node.rules
  rules:
  - alert: HostDown
    expr: up{job="node_exporter"} == 0
    for: 3s
    labels:
      severity: error
    annotations:
      summary: "Instance {{ $labels.instance }} is DONW"
      description: "Node is unreachable for more than 5 minutes"

Screenshot from telegram:

image
giejay commented 4 years ago

You have to add a message to your annotations because that's in the default template, or change the default template.

For example: annotations: summary: "Instance {{ $labels.instance }} is DONW" message: "Instance {{ $labels.instance }} is DONW"

yangm97 commented 4 years ago

Oh... Thank you!