kubernetesprometheusgrafanagrafana-alertskube-prometheus-stack

How to add Grafana's provisioned notification channel in kube-prometheus-stack?


I'm looking for example, how to set up the provisioned notification channel and it's uid in the helm chart https://github.com/prometheus-operator/kube-prometheus

The dashboards are referencing the notification channel, but what is the sample yaml to add the notification channel itself?


Solution

  • Example YAML file : https://github.com/grafana/grafana/blob/main/conf/provisioning/notifiers/sample.yaml

    If you are using the HELM chart for same you can configure same from the values.yaml

    Example : https://github.com/devnulled/charts/blob/24f03dafab2f05f01f6316ba78f9de04adb02f3b/stable/grafana/values.yaml

    notifiers: {}
    #  notifiers.yaml:
    #    notifiers:
    #    - name: email-notifier
    #      type: email
    #      uid: email1
    #      # either:
    #      org_id: 1
    #      # or
    #      org_name: Main Org.
    #      is_default: true
    #      settings:
    #        addresses: an_email_address@example.com
    #    delete_notifiers:
    

    Documentation : https://grafana.com/docs/grafana/latest/administration/provisioning/#alert-notification-channels

    Commit details : https://github.com/devnulled/charts/commit/24f03dafab2f05f01f6316ba78f9de04adb02f3b