Alert Rules provisioned with helm chart

Hello together,

I am trying to deploy alert rules via Grafana value file (helm chart). I am missing a detailed documentation how to configure the different conditions in this yaml value file.

Do you have an idea if there is such a documentation available? Would appreciate that.

For example I would like to add a reducer for a prometheus query. In the Grafana it is simple to configure this. When I try to do the configuration via yaml, I am just missing all the information:

alerting:
  rules.yaml:
    apiVersion: 1
    groups:
      - orgId: 1
        name: generic_rules
        folder: kubernetes
        interval: 60s
        rules:
          - uid: '1CDBC5A6-346B-42A9-9837-06654F1F68BA'
            title: KubernetesMemoryPressure
            condition: A
            data:
              - refId: A
                relativeTimeRange:
                  from: 600
                  to: 0
                datasourceUid: 'E5A430CB-A12A-4801-895B-A5743F2F0DDF'
                model:
                  datasource:
                    type: prometheus
                    uid: '6B991564-3006-4548-97F7-69C9CEF1A469'
                  editorMode: code
                  expr: kube_node_status_condition{condition="MemoryPressure"}
                  format: time_series
                  range: true
                  hide: false
                  intervalMs: 1000
                  maxDataPoints: 43200
                  refId: A
              - refId: B
                datasourceUid: '-100'
                model:
                  refId: B
                  hide: false
                  type: reduce
                  datasource:
                    type: __expr__
                    uid: '-100'
                  function: last
                  mode: strict
                  input: A
            noDataState: Alerting
            for: 60s
            annotations:
              summary: Kubernetes memory pressure
            labels:
              severity: critical
1 Like