-
Notifications
You must be signed in to change notification settings - Fork 406
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
[feature] dashboard resyncPeriod to not change version #1137
Comments
I should have known this but I just didn't remember it. But this is the expected behavior, we could remake it but it woulden't be a small change. In the mean time I will lower how often my |
@NissesSenap I think the default versions to keep is 20, so it won't go beyond that. |
@NissesSenap This is also causing a increase in diskspace usage since the move to v5 of the operator usage has gone up from 2GB and has risen to 15GB. We currently have over 4000+ versions for each of our dashboards. We disabled the resync for now by setting it to a year as we have our Grafana in readonly mode |
@owenhaynes wow, that's a lot. I thought Grafana capped the maximum number of versions at 20? |
could be bug in Grafana as the UI is only showing 20, need to inspect the db some more as has increased in db size over the past month |
At least set a default value of max 20 versions by default in the resources so we don't create these kinds of sizes in db. |
I can take that one. |
PR here: #1168 |
@pb82 yeah the consistent updates to the dashboard was causing the WAL to become big |
thanks @owenhaynes , I'll check if that setting has an effect on the size of the database. It should be the same behaviour with the default sqlite database. |
@7840vz you can always set a reload value that is infinitely long, so it never is reapplied. I changed my value to be run once a day. This way I still know that my dashboards are up to date. |
@NissesSenap , thanks, yes, I also tried to set value to once a day. But in that case users have to wait up to 24h for dashboards to appear after Grafana restart/first start if Grafana is stateless. And I run multiple stateless copies of Grafana with operator.... |
The |
Is there any workaround for this issue? Our team suffer from when the dashboards get updated and page is reloaded while users are working with them as well. |
@gil-brown-argus the idea is that the Grafana cleanup job removes the outdated dashboard versions from time to time. However, it's not clear to me how often this job runs, have you seen it cleaning up old dashboards after some time (maybe a few hours or a day)? It looks like we will have to work around this and that means only submitting dashboard updates if there is a change. So before an update, we need to retrieve the dashboard and compare. |
Hi @pb82 , thanks for your quick response ! |
@gil-brown-argus Do you know how often the job is running? I couldn't find anything in the Grafana codebase. If it was possible to adjust that job to run more often, that would probably also work. |
I have no idea. |
See #1213 for a potential fix |
thanks, I will watch it. |
This should now be solved. To improve this further, we have also created #1221 |
Describe the feature
Currently every time a dashboard is reconciled, the version gets updated.
I don't want a new version should be created for each resync.
Version
v5.0.2
To Reproduce
Apply the following yaml
Dashboard
wait for 30 seconds and see the bump of the versions
Expected behavior
I expect the dashboard to not get a new version when a normal
resyncPeriod
happens.It should only change if a change to the dashboard have been done.
Screenshots
Shows all the version that I currently have
![image](https://private-user-images.githubusercontent.com/14774899/250559779-a73c7d9b-116f-4a74-a6dc-5910537f4d5b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNDY1NDEsIm5iZiI6MTczOTI0NjI0MSwicGF0aCI6Ii8xNDc3NDg5OS8yNTA1NTk3NzktYTczYzdkOWItMTE2Zi00YTc0LWE2ZGMtNTkxMDUzN2Y0ZDViLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDAzNTcyMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTZhMDk0MjY1OGU0ZGYzZjFhYTEyNjE3YzZiNTE5NDEwNzI1MGI4NDZkZTY1NTJkY2IyYTZmMzVmOTUwN2Y3OGQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.CuVh9IjTclBug2nvYWGwefN6qAcI_hBx44pzpPjRz0c)
Here we can see that it's only version that is diffing
![image](https://private-user-images.githubusercontent.com/14774899/250559938-3cba8b46-239c-46d6-8344-c130163e74eb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNDY1NDEsIm5iZiI6MTczOTI0NjI0MSwicGF0aCI6Ii8xNDc3NDg5OS8yNTA1NTk5MzgtM2NiYThiNDYtMjM5Yy00NmQ2LTgzNDQtYzEzMDE2M2U3NGViLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDAzNTcyMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQwOTIxZjFhODNjZDUxZGE1NzEyOGMwZGYwOTdkY2FjYTE2OTY3YTIxOTY2YTgzM2E2OWE1NTAzYzQxZTVlMjYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.pz5OffPx9qpFK0cfYPn33y37j13xrA03ux9bJzGpIOM)
The text was updated successfully, but these errors were encountered: