Skip to content

Commit

Permalink
Fixing alert dashboard issue with grafana 5.x.x
Browse files Browse the repository at this point in the history
I did small change to work existing alerting logic to work with
latest grafana.

tendrl-bug-id: Tendrl#372

Signed-off-by: GowthamShanmugasundaram <[email protected]>
  • Loading branch information
GowthamShanmugam committed Jan 14, 2019
1 parent e8798f2 commit 0ece42f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 3 additions & 2 deletions tendrl/monitoring_integration/grafana/alert_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ def create_resource_dashboard(resource_name, resource):
"repeat": None,
"repeatIteration": None,
"repeatRowId": None,
"showTitle": False,
"title": "Dashboard Row",
"showTitle": True,
"title": resource["resource_name"],
"titleSize": "h6"
}
new_resource_panels = get_panels(resource_rows)
Expand Down Expand Up @@ -315,6 +315,7 @@ def add_gluster_resource_panel(
resource_type = "nodes"
panel_count = most_recent_panel_id
for alert_row in alert_rows:
alert_row["title"] = resource_name
panel_count += 1
for panel in alert_row["panels"]:
targets = panel["targets"]
Expand Down
2 changes: 0 additions & 2 deletions tendrl/monitoring_integration/grafana/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ def upload_default_dashboards():

if 'dashboard' in dashboard_json:
dashboard_id = dashboard_json.get('dashboard').get('id')
response = dashboard_utils.set_home_dashboard(dashboard_id)

response = dashboard_utils.set_home_dashboard(dashboard_id)
if response.status_code == 200:
msg = '\n' + "Dashboard " + \
Expand Down

0 comments on commit 0ece42f

Please sign in to comment.