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

Set alerting to empty dict to ensure it is disabled by default #221

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zhan9san
Copy link

@zhan9san zhan9san commented Jun 12, 2024

Fix #220

If we set the variable grafana_alerting to {}, the alerting .enabled would be set to false.

# 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 %}

It is suggested as below.

Confirm that you don’t intend to upgrade your legacy alerts by disabling legacy alerting (optionally enable Grafana Alerting) in your configuration file.

BTW, keep it is the same as README,

| `grafana_alerting` | {} | [alerting](http://docs.grafana.org/installation/configuration/#alerting) configuration section |

Reference:

https://grafana.com/docs/grafana/v10.4/alerting/set-up/migrating-alerts/#what-happens-if-i-dont-upgrade-from-legacy-alerting-to-grafana-alerting-before-installing-grafana-11

@CLAassistant
Copy link

CLAassistant commented Jun 12, 2024

CLA assistant check
All committers have signed the CLA.

@zhan9san zhan9san force-pushed the feature/set-alerting-to-blank-dict branch from 105a9ff to 709833a Compare June 12, 2024 07:51
@zhan9san zhan9san changed the title Set alerting to blank dict to ensure it is disabled by default Set alerting to empty dict to ensure it is disabled by default Jun 13, 2024
@ishanjainn
Copy link
Member

ishanjainn commented Jun 25, 2024

cc @voidquark Is this related to your PR?

@voidquark
Copy link
Collaborator

cc @voidquark Is this related to your PR?

Yes, my PR fix also this.

@zhan9san zhan9san force-pushed the feature/set-alerting-to-blank-dict branch from 709833a to 28a0f4c Compare June 26, 2024 07:34
Signed-off-by: Jack <jack4zhang@gmail.com>
@zhan9san zhan9san force-pushed the feature/set-alerting-to-blank-dict branch from 28a0f4c to be16271 Compare July 3, 2024 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failed to upgrade Grafana from 10.3 to 11.0.0
4 participants