0

I am new to yaml and trying to setup prometheus yaml file. I have this yaml file

ocp:
  grafana:
     ...
  prometheus:
    alertManager:
      ruleGroups:
        dev:
          - name: service_1
            rules:
              - alert: ... 
                expr: ...
                .
                .
                .
          - name: service_2
            rules:
              - alert: ... 
                expr: ...
                .
                .
                .
        uat:
          - name: service_1
            rules:
              - alert: ... 
                expr: ...
                .
                .
                .
          - name: service_2
            rules:
              - alert: ... 
                expr: ...
                .
                .
                .
        qat:
           somewhat the same

        prod_1:
          the same

        prod_2:
          somewhat the same

as you see, the same code is repeating and I want to reuse it. I want to define services somewhere inside this yaml file and reuse the whole or parts of it. How can I do this?

Amin Ba
  • 704
  • 4
  • 18

0 Answers0