Skip to content
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

Fixing alert dashboard issue with grafana 5.x.x #579

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is redundant, So i removed it

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

redundant line


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