Actions
Feature #46864
openmgr/dashboard: native charts (replace grafana)
Status:
New
Priority:
Normal
Assignee:
-
Category:
Monitoring
Target version:
-
% Done:
0%
Source:
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:
Description
In order to improve user experience and avoid the issues (deployment, configuration, maintenance) caused by dashboard-grafana-prometheus integration, it's been discussed several times the possibility of using 'native charts/widgets' for time-series.
This chartjs plugin provides an almost drop-in replacement:
var myChart = new Chart(ctx, {
type: 'line',
plugins: [ChartDatasourcePrometheusPlugin],
options: {
plugins: {
'datasource-prometheus': {
prometheus: {
endpoint: "http://prom.example.com:9090",
baseURL: "/api/v1",
},
query: '(ceph_pool_stored / (ceph_pool_stored + ceph_pool_max_avail)) * on(pool_id) group_left(instance,name)...',
timeRange: {
type: 'relative',
// from 12 hours ago to now
start: -12 * 60 * 60 * 1000,
end: end,
// refresh every 5s
msUpdateInterval: 5 * 1000,
},
},
},
},
});
This library relies on the client side directly polling Prometheus, and that has a few issues (CORS, http/https, networking). An alternative approach, similar to what it's already done with RGW/iSCSI/..., could be to create a controller in Dashboard back-end acting as a reverse proxy for the prometheus API (this could, btw, provide HA for free).
Updated by Ernesto Puerta about 3 years ago
- Project changed from mgr to Dashboard
- Category changed from 148 to Monitoring
Actions