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 Grafana Configuration for Unified and Legacy Alerting Based on Version #215

Merged
merged 5 commits into from
Jul 3, 2024
Merged

Conversation

voidquark
Copy link
Collaborator

Summary

This PR addresses an issue where the [alerting] section was incorrectly templated for Grafana versions v11 and higher, causing failures in Grafana deployments.

Changes

  • Updated the Jinja template for Grafana configuration to conditionally include [unified_alerting] and [alerting] sections based on the Grafana version.
    • The [unified_alerting] section is included when grafana_version is latest or v11 and higher.
    • The [alerting] section is included only for versions below v11.

Testing

  • Verified that the [unified_alerting] section is correctly templated for versions latest and v11+.
  • Verified that the [alerting] section is correctly templated for versions below v11.

Notes

@voidquark
Copy link
Collaborator Author

Could you please review - @gardar

Copy link
Member

@ishanjainn ishanjainn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aplogies for the late review, LGTM!

roles/grafana/README.md Outdated Show resolved Hide resolved
@HamzaKhait
Copy link
Contributor

Hello guys !

Any news about this PR ?

@JulienOrain
Copy link

Hello !

Also interested in this PR. It is possible to review ?

Thanks

@voidquark
Copy link
Collaborator Author

@ishanjainn Do you think we can merge it?

@ishanjainn ishanjainn merged commit c7c298a into grafana:main Jul 3, 2024
7 of 13 checks passed
@ishanjainn
Copy link
Member

Ill make this part of the next release (Will be released on Monday)
Thanks for the contribution!!!!

@JulienOrain
Copy link

Hello, is it possible to release a new version of the collection ?
Thanks a lot !

kysrpex added a commit to usegalaxy-eu/infrastructure-playbook that referenced this pull request Jul 25, 2024
Upgrade `grafana.grafana` from
git+https://github.com/usegalaxy-eu/ansible-grafana-collection-grafana.git/,cc9f61c0ae30c12eecf2af4696d95a84ea4565e1 (usegalaxy-eu/ansible-grafana-collection fork) to latest official release (reason for change usegalaxy-eu/issues#558 (comment)). Please note that, although it is not a problem because we are not using them anymore, this involves tasks "Import grafana dashboards via api" breaking again and "Ensure datasources exist (via API)" not taking UIDs anymore.

Version 5.3.0 fixed the role `grafana.grafana.grafana` not populating the `[unified_alerting]` section of grafana.ini (grafana/grafana-ansible-collection#215). Therefore, remove the post_task from the grafana.yml playbook that worked the issue around.
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.

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