Helm-charts: [prometheus-kube-stack] AlertManager config override error: err="undefined receiver \"null\" used in route"

Created on 23 Oct 2020  路  3Comments  路  Source: prometheus-community/helm-charts

Describe the bug
Error when overriding the AlertManager Config err="undefined receiver \"null\" used in route"

Version of Helm and Kubernetes:

Helm Version:

$ helm version
version.BuildInfo{Version:"v3.3.4", GitCommit:"a61ce5633af99708171414353ed49547cf05013d", GitTreeState:"dirty", GoVersion:"go1.15.2"}```

Kubernetes Version:

```console
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"16+", GitVersion:"v1.16.6-beta.0", GitCommit:"e7f962ba86f4ce7033828210ca3556393c377bcc", GitTreeState:"clean", BuildDate:"2020-01-15T08:26:26Z", GoVersion:"go1.13.5", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.2", GitCommit:"f5743093fd1c663cb0cbc89748f730662345d44d", GitTreeState:"clean", BuildDate:"2020-09-16T13:32:58Z", GoVersion:"go1.15", Compiler:"gc", Platform:"linux/amd64"}

Which chart: kube-prometheus-stack
Which version of the chart: v2.21.0

What happened:
After Installing the chart from a values override file with helm install prometheus prometheus-community/kube-prometheus-stack -f values.yaml the AlertManager pod has the status CrashLoopBackOff.

Output of kubectl logs alertmanager-prometheus-kube-prometheus-alertmanager-0 -c alertmanager:

level=info ts=2020-10-23T12:08:02.389Z caller=main.go:216 msg="Starting Alertmanager" version="(version=0.21.0, branch=HEAD, revision=4c6c03ebfe21009c546e4d1e9b92c371d67c021d)"
level=info ts=2020-10-23T12:08:02.389Z caller=main.go:217 build_context="(go=go1.14.4, user=root@dee35927357f, date=20200617-08:54:02)"
level=info ts=2020-10-23T12:08:02.427Z caller=coordinator.go:119 component=configuration msg="Loading configuration file" file=/etc/alertmanager/config/alertmanager.yaml
level=error ts=2020-10-23T12:08:02.428Z caller=coordinator.go:124 component=configuration msg="Loading configuration file failed" file=/etc/alertmanager/config/alertmanager.yaml err="undefined receiver \"null\" used in route"
````

The `values.yaml` file:

````
alertmanager:

  enabled: true

  config:

    route:
      group_by: ['alertname']
      group_wait: 10s
      group_interval: 10s
      repeat_interval: 1h
      receiver: 'web.hook'

    receivers:
      - name: 'web.hook'
        webhook_configs:
        - url: 'http://localhost:7200/'
````

**What you expected to happen**:

AlertManager pod start successfully and has a webhook configured.

**How to reproduce it** (as minimally and precisely as possible):


values.yaml

alertmanager:

enabled: true

config:

route:
  group_by: ['alertname']
  group_wait: 10s
  group_interval: 10s
  repeat_interval: 1h
  receiver: 'web.hook'

receivers:
  - name: 'web.hook'
    webhook_configs:
    - url: 'http://localhost:7200/'

helm install prometheus prometheus-community/kube-prometheus-stack -f values.yaml
```

Anything else we need to know:

bug lifecyclstale

Most helpful comment

This bug appears when only the root route is configured.

My workaround is add a receiver with name='null' to route Watchdog alerts or configure at least one more child route.

All 3 comments

This bug appears when only the root route is configured.

My workaround is add a receiver with name='null' to route Watchdog alerts or configure at least one more child route.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions.

This issue is being automatically closed due to inactivity.

Was this page helpful?
0 / 5 - 0 ratings