Open amrit-canva opened 4 months ago
I'm facing the same issue with the introduction of this new Grafana definitions validation in Mimir 2.13. From Alertmanager perspective api_key_file field for Opsgenie is still entirely supported.
Questions:
Encountered the same issue no global Slack API URL set
when using api_url_file
in a slack_configs
receiver. ~Workaround is to specify a fake url under global.slack_api_url
. The value has to be a valid http url. The global value is ignored as it is only a default value when no url is specified under the receiver.~ Was too soon with validating, Mimir does start up but the alerts fail to send. It seems api_key
needs to be set.
mimirtool alertmanager verify alertmanager.yaml
did not give any validation error, the changelog mention anything about these field becoming required nor does upstream alertmanager configuration specify anything about global required field, so this was completely unexpected. Is the validation of the configuration correct?
Describe the bug
Since upgrading to Mimir
2.13.0
, Mimir Alertmanager is not loading our existing config and is giving this error:To Reproduce
Steps to reproduce the behavior:
Update the alertmanager fallback config to include an Opsgenie receiver and do not set
opsgenie_api_key
in the global config.Alertmanager won't come up and in logs an error will be produced indicating that global opsgenie API key is not set.
Expected behavior
opsgenie_api_key
is not a mandatory config parameter. In our setup we useopsgenie_api_key_file
and specify this at per receiver level, instead of in the global config.So I expect that the presence of
opsgenie_api_key
in global config section must not be manadatory.Environment
Additional Context
Seems like this behaviour is introduced through this check in
grafana/alerting
repo: https://github.com/grafana/alerting/blob/main/definition/compat.go#L115-L119