alerta / prometheus-config

Prometheus config for Alerta
MIT License
255 stars 102 forks source link

labels.__name__ not work #30

Closed chrishyc closed 3 years ago

chrishyc commented 3 years ago

in alertmanager my-rule.yaml

groups:
- name: svc-alert-rule
  rules:
  - alert: dubbo_invoke_exception
    expr: "rate({__name__=~'dubbo_.*_fail_.*'}[5m])>0"
    for: 5s
    labels:
      metricsName: '{{ $labels.__name__ }}'

{{ $labels.__name__ }} can not get the metric name,

satterly commented 3 years ago

You want to post this issue to https://github.com/prometheus/alertmanager/issues/new/choose, not here.