grafana / loki

Like Prometheus, but for logs.
https://grafana.com/loki
GNU Affero General Public License v3.0
23.95k stars 3.45k forks source link

Switch enable_alertmanager_v2 default to true #12859

Open nerrehmit opened 6 months ago

nerrehmit commented 6 months ago

Is your feature request related to a problem? Please describe.

Currently the default value for enable_alertmanager_v2 is false which means on a default installation where this setting is not configured the connection to the alertmanager will use v1 of the API. The alertmanager v1 API has been deprecated since 2019 in versions 0.16.0 - 0.26.0. With the new alertmanager 0.27.0 (released Feb. 2024) the v1 API has been removed. https://github.com/prometheus/alertmanager/releases/tag/v0.27.0

This prevents loki from sending alerts to alertmanager if enable_alertmanager_v2 is not explicitly set to true.

Describe the solution you'd like I think it makes sense to switch the default value of enable_alertmanager_v2 to true and reflect that in the documentation as well.

Describe alternatives you've considered Adding a disclaimer in the documentation that newer alertmanager versions require this setting set to true.

Additional context Default value is set here: https://github.com/grafana/loki/blob/main/pkg/ruler/base/ruler.go#L171

If you agree with the change I can try to get a PR ready for this. Let me know your thoughts.

JStickler commented 6 months ago

@nerrehmit if you want to put together a PR to update this, that would be much appreciated.