]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mgr/dashboard: Add Grafana proxy
authorPatrick Nawracay <pnawracay@suse.com>
Thu, 19 Apr 2018 07:29:41 +0000 (09:29 +0200)
committerPatrick Nawracay <pnawracay@suse.com>
Wed, 6 Jun 2018 09:11:27 +0000 (11:11 +0200)
commit30b5d72d2d53561072e7ed141dc7e87a956d0dd4
treed44e31044a7b774324dd0f5c8bad874803309474
parentf21df7672d4db80acaf782383ccaf474261d5886
mgr/dashboard: Add Grafana proxy

Add the ability to connect the dashboard with a Grafana instance to
display graphs from Grafana incorporated into the dashboard.

Possible configuration options:

$ ceph dashboard set-grafana-api-host <host> # Default: 'localhost'
$ ceph dashboard set-grafana-api-port <port> # Default: 3000
$ ceph dashboard set-grafana-api-scheme <scheme> # Default: 'http'

The configuration can be checked using a GET request to the API endpoint
`/api/grafana/status`. It returns a JSON response in the following
format:

    {
"available": False,
"message": "<error message>",
    }

The message is not returned if Grafana is available.

The Grafana proxy is reachable through
`http(s)://<host>/api/grafana/proxy`.

Signed-off-by: Patrick Nawracay <pnawracay@suse.com>
doc/mgr/dashboard.rst
src/pybind/mgr/dashboard/controllers/grafana.py [new file with mode: 0644]
src/pybind/mgr/dashboard/settings.py
src/pybind/mgr/dashboard/tests/test_grafana.py [new file with mode: 0644]