]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mgr/dashboard: Push Grafana dashboards on startup
authorZack Cerza <zack@redhat.com>
Tue, 22 Jan 2019 00:30:44 +0000 (17:30 -0700)
committerZack Cerza <zack@redhat.com>
Tue, 4 Jun 2019 20:26:55 +0000 (14:26 -0600)
commitc0bc7dafa777cfb349f372237ec91c5285dd4df2
tree3dd4513e88abd8d5dab9b074652831efc7630014
parentbc1c6353d9e85444accd4e1325b89db52562a3d5
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>
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