grafana-ansible-collection icon indicating copy to clipboard operation
grafana-ansible-collection copied to clipboard

Update grafana.ini.j2

Open twdrabek opened this issue 1 year ago • 2 comments

Changed the legacy setting [alerting] to [unified_alerting]. Grafana-server will not start with the legacy setting enabled.

twdrabek avatar May 16 '24 03:05 twdrabek

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar May 16 '24 03:05 CLAassistant

I think it would be good to rename the variable grafana_alerting to grafana_unified_alerting.

voidquark avatar May 18 '24 11:05 voidquark

I think it would be good to rename the variable grafana_alerting to grafana_unified_alerting.

I agree--for consistency. However, if I'm not mistaken, this is lower level. This is a section header in Grafana.ini so changing variable alone will not fix the error. If version selection allows a numerical version, it might be better to use a tag with a ternary to select the correct section header.

twdrabek avatar May 18 '24 12:05 twdrabek

I quite like how the grafana helm chart automatically converts yaml to grafana.ini

Example config: https://github.com/grafana/helm-charts/blob/main/charts/grafana/values.yaml#L772-L1098 Templating: https://github.com/grafana/helm-charts/blob/main/charts/grafana/templates/_config.tpl#L11-L36

grafana.ini:
  alerting:
    enabled: true

becomes

[alerting]
enabled = true

Should be doable for ansible too. Maybe should be a separate issue tho.

intermittentnrg avatar May 18 '24 15:05 intermittentnrg

Created separate issue #210 for my suggestion above.

intermittentnrg avatar May 21 '24 06:05 intermittentnrg

I think it would be good to rename the variable grafana_alerting to grafana_unified_alerting.

I agree--for consistency. However, if I'm not mistaken, this is lower level. This is a section header in Grafana.ini so changing variable alone will not fix the error. If version selection allows a numerical version, it might be better to use a tag with a ternary to select the correct section header.

Version selection makes sense for backward compatibility, which I like. Could you implement this and update the PR?

voidquark avatar May 23 '24 14:05 voidquark