Coder Social home page Coder Social logo

anishsid / ceph-dash Goto Github PK

View Code? Open in Web Editor NEW

This project forked from crapworks/ceph-dash

0.0 2.0 0.0 3.73 MB

Flask based api / dashboard for viewing a ceph clusters overall health status

License: BSD 2-Clause "Simplified" License

Python 3.55% CSS 0.36% JavaScript 91.91% HTML 4.18%

ceph-dash's Introduction

ceph-dash - a free ceph dashboard / monitoring api

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.

You can find a blog entry regarding monitoring a Ceph cluster with ceph-dash on Crapworks.

Here you can find a presentation from Paul Evans, taken from the Ceph Day in San Francisco (March 12, 2015) where he is comparing several Ceph-GUIs, including ceph-dash.

Newest Feature

Old content warning

If an AJAX call to the underlying ceph-dash API isn't answered within 3 seconds, a silent timeout is happening. The dashboard will still show the old data. I wanted to give the user a hint if something is wrong with the api or the ceph cluster, so I've added a little warning icon that tells you if the data shown in ceph-dash is getting to old. Reasons for that can be an slow or unresponsive cluster (some error handling is happening - a monitor failover for example).

screenshot03

Unhealthy OSD popover

The current release features a popover, which becomes available if there are any unhealthy osds in the cluster. If the count for Unhealthy osds is not 0, hovering over the field with the number of unhealthy osds will show a popover with additional information about those osds (including the name, the state and the host that contains this osd). To do this, ceph-dash has to issue an additional command to the cluster. This additional request will only be triggered if the first command shows any unhealthy osds!

screenshot03

I also did some minor code refactoring to clean everything up a bit.

Quickstart

  1. clone this repository
  2. place it on one of your ceph monitor nodes
  3. run ceph-dash.py
  4. point your browser to http://ceph-monitor:5000/
  5. enjoy!

Dashboard

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.

REST Api

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 around 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.

Nagios Check

A Nagios check that uses ceph-dash for monitoring your ceph cluster status is available here

Deployment

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,

You can edit the config.json file to configure how to talk to the Ceph cluster.

  • ceph_config is the location of /etc/ceph/ceph.conf
  • keyring points to a keyring to use to authenticate with the cluster
  • client_id or client_name is used to specify the name to use with the keyring

Pictures!!

In case anyone wants to see what to expect, here you go:

screenshot01

Graphite Integration

I've integrated the flot graphing library to make it possible to show some graphs from Graphite in ceph-dash. First of all: ceph-dash does NOT put any data into graphite! You have to do it yourself. We are using our Icinga monitoring to push performance metrics to graphite. The graphs shown in the example were created by the above mentioned Nagios check for ceph-dash.

If you do not have a graphite section in your config.json the Metrics section will not appear in ceph-dash.

Configuration

There is a sample configuration file called config.graphite.json. Everything in there should be quite self-explanatory. If not, feel free to open an issue on github!

Example

Here you can see an example where one graph shows the bytes read/write per second, and another one shows the IOPS during the last two hours:

screenshot01

ceph-dash's People

Contributors

crapworks avatar wido avatar

Watchers

James Cloos avatar Anish Sidhan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.