Skip to content

Commit 0ece42f

Browse files
Fixing alert dashboard issue with grafana 5.x.x
I did small change to work existing alerting logic to work with latest grafana. tendrl-bug-id: #372 Signed-off-by: GowthamShanmugasundaram <[email protected]>
1 parent e8798f2 commit 0ece42f

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

tendrl/monitoring_integration/grafana/alert_dashboard.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ def create_resource_dashboard(resource_name, resource):
140140
"repeat": None,
141141
"repeatIteration": None,
142142
"repeatRowId": None,
143-
"showTitle": False,
144-
"title": "Dashboard Row",
143+
"showTitle": True,
144+
"title": resource["resource_name"],
145145
"titleSize": "h6"
146146
}
147147
new_resource_panels = get_panels(resource_rows)
@@ -315,6 +315,7 @@ def add_gluster_resource_panel(
315315
resource_type = "nodes"
316316
panel_count = most_recent_panel_id
317317
for alert_row in alert_rows:
318+
alert_row["title"] = resource_name
318319
panel_count += 1
319320
for panel in alert_row["panels"]:
320321
targets = panel["targets"]

tendrl/monitoring_integration/grafana/dashboard.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ def upload_default_dashboards():
6060

6161
if 'dashboard' in dashboard_json:
6262
dashboard_id = dashboard_json.get('dashboard').get('id')
63-
response = dashboard_utils.set_home_dashboard(dashboard_id)
64-
6563
response = dashboard_utils.set_home_dashboard(dashboard_id)
6664
if response.status_code == 200:
6765
msg = '\n' + "Dashboard " + \

0 commit comments

Comments
 (0)