alerta/prometheus-config

labels.__name__ not work

chrishyc opened this issue · 1 comments

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,

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