prometheus alertmanager alertrule with multiple arguments for the same query

250 views Asked by At
- alert: APIHighRequestLatency  DEV
        expr: (sum(traefik_service_request_duration_seconds_sum{instance="company.com:12345",service=~"backend-module-test.*"}) / sum(traefik_service_requests_total{instance="company.com:12345",service=~"backend-module-test.*"}) * 1000) > 0
        for: 1m
        labels:
          severity: 4
          threshold: warning
        annotations:
          summary: "API module-test DEV response time > 50 ms"
          description: "{{ $value }} is the avg response time backend-module-test for last one minute in DEV environment"

In the query I want to change the service with following set of arguments

  • backend-module-test
  • backend-module-test1
  • backend-module-test2

But i do not want to repeat the whole alert rule again, is there any way to parameterize this ?

0

There are 0 answers