-
Notifications
You must be signed in to change notification settings - Fork 13
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
Added code to update grafana dashboards on monitoring-integration start #576
base: master
Are you sure you want to change the base?
Conversation
5fe3b74
to
e48acde
Compare
Codecov Report
@@ Coverage Diff @@
## master #576 +/- ##
=========================================
Coverage ? 44.95%
=========================================
Files ? 40
Lines ? 2307
Branches ? 346
=========================================
Hits ? 1037
Misses ? 1217
Partials ? 53
Continue to review full report at Codecov.
|
Signed-off-by: Anmol Sachan <[email protected]>
e48acde
to
ae00c4a
Compare
title.append(dashboard_json["uri"].split('/')[1]) | ||
|
||
for dashboard_json in NS.config.data["dashboards"]: | ||
if dashboard_json in title: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This if condition is checking two completely different things:
["cluster-dashboard", "brick-dashboard", "host-dashboard", "volume-dashboard"] &
['tendrl-gluster-at-a-glance', 'tendrl-gluster-hosts', 'tendrl-gluster-volumes', 'tendrl-gluster-bricks']
But its not failing as we are going down straight to creating the dashboard again. The dashboards cannot get updated as the grafana rejects the request with : {u'status': u'name-exists', u'message': u'A dashboard with the same name already exists'} .
dashboard = dashboard_json["uri"].split('/')[1] | ||
title.append(dashboard) | ||
# Deleting already existing dashboards if present | ||
response = dashboard_utils.delete_dashboard(dashboard) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't want to delete all dashboards in every sync. I think we need to find a better way of handling this situation.
We need to see if there is an intersection/difference between the two files then only we need to update it. Otherwise, the will keep refreshing the dashboards and can cause a problem(while a user is at a particular dashboard) also it increases the number of calls on the server.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cloudbehl agreed, will see to it.
@anmolsachan can you attach Bugzilla to this issue |
We dont have one right now, this might go in an update later, will do it when we get a go on this. |
Signed-off-by: Anmol Sachan [email protected]