This is a small and clean approach of providing the ceph overall cluster health status via a restful json api as well as via a (hopefully) fancy web gui. There are no dependecies to the existing ceph-rest-api
. This wsgi application talks to the cluster directly via librados. I'm aware that there already is an api for ceph, but I simply hate XML, so I decided to build one using json instead.
- clone this repository
- place it on one of your ceph monitor nodes
- run
ceph-dash.py
- point your browser to http://:5000/
- enjoy!
If you hit the address via a browser, you see the web frontend, that will inform you on a single page about all important things of your ceph cluster.
If you access the address via commandline tools or programming languages, use content-type: application/json
and you will get all the information as a json output (wich is acutally the json formatted output of ceph status --format=json
.
Anyways, this is not a wrapper arounf the ceph binary, it uses the python bindings of librados.
This api can be requested by, for example, a nagios check, to check your overall cluster health. This brings the advantage of querying this information without running local checks on your monitor nodes, just by accessing a read only http api.
Hint: a nagios check will appear soon here!
You may want to deploy this wsgi application into a real webserver like apache or nginx. For convenience, I've put the wsgi file and a sample apache vhost config inside of the contrib
folder,
In case anyone wants to see what to expect, here you go: