]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/dashboard: Push Grafana dashboards on startup 28635/head
authorZack Cerza <zack@redhat.com>
Tue, 22 Jan 2019 00:30:44 +0000 (17:30 -0700)
committerBoris Ranto <branto@redhat.com>
Tue, 18 Jun 2019 14:46:47 +0000 (16:46 +0200)
commite9f9d031f99dc290895124338b9eed52fc18b60f
tree274753ad12e23475d34360a0188a5bec745a0da9
parentc84c397a9d12e04fb0daafa123a0b27fa8c1b05b
mgr/dashboard: Push Grafana dashboards on startup

Because we didn't have viable way to populate Grafana dashboards in a
fully containerized context, we needed a different method. This will
work in packaged and containerized deployments.

We provide three methods to push the dashboard JSON files to the Grafana
instance: a command (ceph dashboard update-grafana-dashboards); an API
endpoint (/api/grafana/update_dashboards); and an automatic on-startup
feature that is disabled by default (ceph dashboard
set-grafana-update-dashboards true). The on-startup method will also
retry periodically to avoid racing with the startup of Grafana itself.

Signed-off-by: Zack Cerza <zack@redhat.com>
(cherry picked from commit c0bc7dafa777cfb349f372237ec91c5285dd4df2)
src/pybind/mgr/dashboard/controllers/grafana.py
src/pybind/mgr/dashboard/exceptions.py
src/pybind/mgr/dashboard/frontend/src/app/shared/services/task-message.service.ts
src/pybind/mgr/dashboard/grafana.py [new file with mode: 0644]
src/pybind/mgr/dashboard/module.py
src/pybind/mgr/dashboard/settings.py
src/pybind/mgr/dashboard/tests/test_grafana.py
src/pybind/mgr/dashboard/tox.ini