-
Notifications
You must be signed in to change notification settings - Fork 22
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
Restart grafana after updating dashboards #319
Restart grafana after updating dashboards #319
Conversation
Did not apply this patch directly, but I tried |
Note that we should take a second pass sometime to optimise calls to |
Hi @samuelallan72, thank you for your contribution! There seems to be a reload API that might update the dashboards without going through the whole Grafana restart: https://grafana.com/docs/grafana/latest/developers/http_api/admin/#reload-provisioning-configurations Could you have a look if that doesn't fix your issue in a better way? |
@mmkay this may work, but it would involve adding a lot more logic to the charm:
I think this is probably more work than is worth it to fix this bug? Also we seem to restart grafana fairly often on changes; we've just missed restarting in this case. What are your thoughts on this? |
Hi @mmkay , could you take another look at this? Thanks :) |
This ensures that dashboard changes are picked up by grafana. Fixes #303
Hey @samuelallan72 - I've rebased the branch to newest main and integration tests seem to be failing in the PR. At first sight it looks like there might be errors around the restart timing so this might require a deeper look. We have the issue in our team's minds so will likely get back to it in near future. |
Thanks for looking into it @mmkay ! I don't have much time right now to investigate the tests, but I can try when I do have time if you haven't already. 😁 Note that there may be a better or more efficient method for deciding when to restart grafana to get it to pick up the dashboard changes. This was just a method that worked for me and seemed a reasonable starting point. |
Closing because this appears to have been fixed elsewhere. :) See #303 |
This ensures that dashboard changes are picked up by grafana.
Fixes #303