Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "Option '[alerting].enabled' cannot be true. Legacy Alerting is removed" on 11.0.0 #204

Closed
michaelkebe opened this issue May 17, 2024 · 4 comments · Fixed by #215
Closed

Comments

@michaelkebe
Copy link

michaelkebe commented May 17, 2024

When trying to upgrade from a previous grafana version to 11.0.0 the grafana-server service fails to start and the log of the grafana-server service says:

May 17 17:51:26 grafanaXXXXXXXX grafana[100358]: logger=settings t=2024-05-17T17:51:26.688716678+02:00 level=error msg="Option '[alerting].enabled' cannot be true. Legacy Alerting is removed. It is no longer deployed, enhanced, or supported. Delete '[alerting].enabled' and use '[unified_alerting].enabled' to enable Grafana Alerting. For more information, refer to the documentation on upgrading to Grafana Alerting (https://grafana.com/docs/grafana/v10.4/alerting/set-up/migrating-alerts)"

The template grafana.ini.j2 has a fixed alerting section:

# Alerting
[alerting]
{% if grafana_alerting != {} %}
enabled = true
{%   for k,v in grafana_alerting.items() %}
{%     if k != 'enabled' %}
{{ k }} = {{ v }}
{%     endif %}
{%   endfor %}
{% else %}
enabled = false
{% endif %}

Depending of the grafana version this has to be named ``[alerting]or[unified_alerting]`.

@michaelkebe michaelkebe changed the title Fix "Option '[alerting].enabled' cannot be true. Legacy Alerting is removed" Fix "Option '[alerting].enabled' cannot be true. Legacy Alerting is removed" on 11.0.0 May 17, 2024
@velomatt
Copy link

velomatt commented May 17, 2024

I took a look at the source code.

As a workaround, you can deploy with alerting disabled by defining grafana_alerting: {}

I validated this works in my own deployment.

If you need to enable Legacy Alerting, there's no way to do so presently I think.

@voidquark
Copy link
Collaborator

@michaelkebe could you please create PR?

@intermittentnrg
Copy link

There is PR #203 open

@voidquark
Copy link
Collaborator

There is PR #203 open

Correct, there is a PR, but it is not ready because it hasn’t adjusted everything required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants