auau
auau

Reputation: 45

Configure alertmanager alerting in prometheus helm chart values.yaml

I want to connect prometheus to alertmanager and I'm facing a problem with configuring alertmanager alerting endpoints in values.yaml helm chart.
I tried it before with docker-compose and it worked but it's different with helm charts.

I downloaded the official helm chart for prometheus that includes alertmanager I configured the services and the targets to scrape but I can't find where to specify alertmanager to prometheus to try to forward the alerts and send it by slack.

Upvotes: 1

Views: 11145

Answers (2)

Andrew Li
Andrew Li

Reputation: 549

If you already moved to kube-prometheus-stack, you could try the following steps:

  1. create a values.yaml

    # values.yaml
    alertmanager:
      config:
        global:
          resolve_timeout: 5m
          # The API URL to use for Slack notifications.
          [ slack_api_url: <secret> ]
          [ slack_api_url_file: <filepath> ]
    
  2. apply or upgrade your release

    helm install|upgrade [RELEASE] prometheus-community/kube-prometheus-stack -f values.yaml
    

REF:

Upvotes: 0

Alberto Crego
Alberto Crego

Reputation: 89

The easiest configuration is set the configMapOverride: https://github.com/helm/charts/blob/da8b2fa27f81a4a4d44e1ac320f9081a5948224e/stable/prometheus/values.yaml#L68

After configuring this, you must create a configMap with all configuration like a usually alertmanager: https://github.com/kubernetes/kubernetes/blob/master/cluster/addons/prometheus/alertmanager-configmap.yaml

Upvotes: 3

Related Questions