Cleanup #45184
mgr/dashboard: monitoring: replace Grafana JSON with code-based generators
0%
Description
Currently Grafana JSON files comprise around 8,500 lines. Despite 90% is boilerplate code (Grafana defaults), they are still difficult to interpret and debug, prone to backporting messes, impossible to test or customize.
The idea would be to replace those JSON files with Python (or any other language) generators. Hopefully there seems to be a couple of libraries to carry this out, the most notable is Grafanalib (see lecture at GrafanaCon for more details):
$ pip install grafanalib $ generate-dashboard -o pool-overview.json pool-overview.py
Sample dashboard generator (or this other one):
dashboard = common.Dashboard(
title="Pool Overview",
rows=[
Row(panels=[
Graph(title="Top 15 clients"....
...
],
...
)
Related issues
History
#1 Updated by Ernesto Puerta over 3 years ago
Alternative: jsonnet
#2 Updated by Ernesto Puerta almost 3 years ago
- Project changed from mgr to Dashboard
- Category changed from 148 to Monitoring
#3 Updated by Aashish Sharma over 2 years ago
- Assignee set to Aashish Sharma
- Pull request ID set to 42194
#4 Updated by Aashish Sharma over 2 years ago
- Status changed from New to Fix Under Review
#5 Updated by Ernesto Puerta over 2 years ago
- Status changed from Fix Under Review to Pending Backport
- Backport changed from octopus, nautilus to pacific
Removed the nautilus/octopus backports, as older releases distros don't support the latest jsonnet packages.
#6 Updated by Backport Bot over 2 years ago
- Copied to Backport #52135: pacific: mgr/dashboard: monitoring: replace Grafana JSON with code-based generators added
#7 Updated by Ernesto Puerta over 2 years ago
- Precedes Cleanup #52238: mgr/dashboard: fix grafonnet build error added
#8 Updated by Loïc Dachary over 2 years ago
- Status changed from Pending Backport to Resolved
While running with --resolve-parent, the script "backport-create-issue" noticed that all backports of this issue are in status "Resolved" or "Rejected".
#9 Updated by Ernesto Puerta over 2 years ago
- Copied to Cleanup #52777: mgr/dashboard: monitoring: complete grafonnet refactoring added