Coder Social home page Coder Social logo

crapworks / ceph-dash Goto Github PK

View Code? Open in Web Editor NEW
406.0 61.0 123.0 4.68 MB

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

License: BSD 2-Clause "Simplified" License

Python 7.78% CSS 0.39% JavaScript 86.51% HTML 4.48% Shell 0.57% Dockerfile 0.27%
ceph dashboard graphite influxdb monitoring api

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 dependencies 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

Rook on Kubernetes

I recently played around with Rook on Kubernetes. This was so far my fastest Ceph cluster to setup. Since Rook provides some secrets and config maps already, I made the docker container for Ceph-dash compatible with their format. I also added Kubernetes deployment files in the contrib folder (tested on GKE, but should work on any Kubernetes cluster). No need to configure anything, they should just work out of the box.

Docker container

Since everybody recently seems to be hyped as hell about the container stuff, I've decided that I can contribute to that with a ready-to-use docker container. Available at Docker Hub you can pull the ceph-dash container and configure it via the following environment variables:

  • Required: $CEPHMONS (comma separated list of ceph monitor ip addresses)
  • Required: $KEYRING (full keyring that you want to use to connect to your ceph cluster)
  • Optional: $NAME (name of the key you want to use)
  • Optional: $ID (id of the key you want to use)

Example

docker run -p 5000:5000 -e CEPHMONS='10.0.2.15,10.0.2.16' -e KEYRING="$(sudo cat /etc/ceph/keyring)" crapworks/ceph-dash:latest

InfluxDB support

I've refactored the code quite a bit to make use of Blueprints instead of Method Views. The structure of the code has changed, but I was keeping everything backwards compatible to all your deployments should still work with the current version. This is for now not a release, because I want to see if there is some negative feedback on this. And here are two new things you can cheer about!

Graphing Proxies

Your browser does not talk directly to Graphite directly anymore! It uses the /graphite endpoint which already provides flot-formated json output. Ceph-dash will establish a connection to Graphite and gather all relevant data. This should prevent Cross-Domain issues and in case of InfluxDB, also hides the database password. Due to it's generic nature, it should be easy to add more graphing backends if needed.

InfluxDB support

Ceph-dash now supports also InfluxDB as a graphing backend besides Graphite. You need client and server version > 0.9 since the api broke with that release and is not backwards compatible. If you do not have the InfluxDB python module installed, Ceph-dash will NOT enable the InfluxDB proxy and will not load any configured InfluxDB resources. So please be sure to have the latest InfluxDB python module installed if you want to use InfluxDB as a backend. You can find a sample configuration file called config.influxdb.json in the root folder, which should explain how to use it. Please understand that I can't give you support for you InfluxDB setup, because this would definitely exceed the scope of Ceph-Dash.

screenshot04

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 (which is actually 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

FAQ

How can I change the port number

The development server of Ceph-dash runs by default on port 5000. If you can't use this port since it is already used by another application, you can change it by opening ceph-dash.py and change the line

app.run(host='0.0.0.0', debug=True)

to

app.run(host='0.0.0.0', port=6666, debug=True)

Please keep in mind that the development server should not be used in a production environment. Ceph-dash should be deployed into a proper webserver like Apache or Nginx.

Running ceph-dash behind a reverse proxy

Since Version 1.2 ceph-dash is able to run behind a reverse proxy that rewrites the path where ceph-dash resides correctly. If you are using nginx, you need to use a config like this:

server {
    location /foobar {
        proxy_pass http://127.0.0.1:5000;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Scheme $scheme;
        proxy_set_header X-Script-Name /foobar;
    }
}

See also: https://github.com/wilbertom/flask-reverse-proxy, which is where I got the code for doing this.

Problems with NginX and uwsgi

See this issue for a detailed explanation how to fix errors with NginX and uwsgi (Thanks to @Lighiche)

ceph-dash's People

Contributors

aletessier avatar azadshm avatar crapworks avatar enzobet avatar justyu avatar k0ste avatar kevinflynn387 avatar mvalois avatar wido avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ceph-dash's Issues

Cluster Status:HEALTH_WARN

操作系统:cenots7.3 x64
ceph版本:ceph version 12.2.0 luminous (rc)
ceph-dash-luminous:
ceph -s 状态:health: HEALTH_OK
但是python ceph-dash.py 访问http://ip:5000
Ceph Cluster Overall Status: Cluster Status:HEALTH_WARN

The ceph-dash don't get data from the ceph cluster on centos 6.5

II don't know the reason. My configure:
sudo cat config.json
{
"ceph_config": "/etc/ceph/ceph.conf",
"keyring": "/etc/ceph/admin.keyring",
"client_name": "client.admin",
"graphite": {
"url": "http://graphite.server.org",
"metrics": [
{
"targets": [
"avg(monitoring.ceph-mon_.ceph_overall_cluster_status.read_bytes_sec)",
"avg(monitoring.ceph-mon_.ceph_overall_cluster_status.write_bytes_sec)"
],
"labels": [ "Read", "Write" ],
"from": "-2h",
"mode": "byteRate"
},
{
"targets": [
"avg(monitoring.ceph-mon*.ceph_overall_cluster_status.op_per_sec)"
],
"labels": [ "IOPS" ],
"colors": [ "#5bc0de" ],
"from": "-2h"
}
]
}

}

Cannot run ceph-dash

Good Morning.

I have use ceph-dash before and it is a brilliant but currently I cannot seem to get it running.

I have my cluster set up and running no problem and have the config.json pointed at my config file but when I type in the command:

sudo python ceph-dash.py

I only get this message:

 * Running on http://127.0.0.1:5000/
 * Restarting with reloader

Any help with this matter is much appreciated.

Walshy

Wrong template?

Hello,
Now ceph-dash loads all data, but when it renders template - template is clean. So I didn't found any includes in template. Is it right? What I am doing wrong?

cannot get timechekMons

I found the format of cluster_status has changed.The format of health parameter has changed.
So monitor status cannot displayed on web page.
The following is the json I received

{u'election_epoch': 1, u'quorum': [0], u'mdsmap': {u'max': 0, u'epoch': 32, u'by_rank': [], u'up': 0, u'in': 0}, 
u'monmap': {u'epoch': 1, u'mons': [{u'name': u'node241', u'rank': 0, u'addr': u'192.168.2.41:6789/0'}], 
u'modified': u'0.000000', u'fsid': u'3b37db44-f401-4409-b3bb-75585d21adfe', u'created': u'0.000000'}, 
u'health': {u'detail': [], 
            u'timechecks': {u'round_status': u'finished', u'epoch': 1, u'round': 0}, 
            u'health': {u'health_services': [{u'mons': [{u'last_updated': u'2015-11-03 12:36:31.878521', u'name': u'node241', u'avail_percent': 96, u'kb_total': 49794300, u'kb_avail': 48088316, u'health': u'HEALTH_OK', u'kb_used': 1705984, u'store_stats': {u'bytes_total': 16770127, u'bytes_log': 2031616, u'last_updated': u'0.000000', u'bytes_misc': 1381005, u'bytes_sst': 13357506}}]}]}, 
            u'overall_status': u'HEALTH_OK', u'summary': []}, 
u'fsid': u'3b37db44-f401-4409-b3bb-75585d21adfe', 
u'quorum_names': [u'node241'], 
u'osdmap': {u'osdmap': {u'full': False, u'nearfull': False, u'num_osds': 5, u'num_up_osds': 5, u'epoch': 190, u'num_in_osds': 5, u'num_remapped_pgs': 0}}, 
u'pgmap': {u'bytes_total': 509773004800, u'num_pgs': 256, u'data_bytes': 269075241, u'bytes_used': 931401728, u'version': 12950, 
           u'pgs_by_state': [{u'count': 256, u'state_name': u'active+clean'}], u'bytes_avail': 508841603072}}  

OSError: librados.so.2: cannot open shared object file: No such file or directory

root@docker-ceph-node:~/ceph-dash# python ceph-dash.py 
 * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
 * Restarting with stat
 * Debugger is active!
 * Debugger pin code: 978-066-757
127.0.0.1 - - [16/Oct/2016 22:44:14] "GET / HTTP/1.1" 500 -
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 2000, in __call__
    return self.wsgi_app(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1991, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1567, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1988, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1641, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1544, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1639, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1625, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/lib/python2.7/dist-packages/flask/views.py", line 84, in view
    return self.dispatch_request(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flask/views.py", line 149, in dispatch_request
    return meth(*args, **kwargs)
  File "/root/ceph-dash/app/dashboard/views.py", line 112, in get
    with Rados(**self.clusterprop) as cluster:
  File "/usr/local/lib/python2.7/dist-packages/rados.py", line 215, in __init__
    self.librados = CDLL(library_path if library_path is not None else 'librados.so.2')
  File "/usr/lib/python2.7/ctypes/__init__.py", line 365, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: librados.so.2: cannot open shared object file: No such file or directory

How to fix this error ?

socket.error: [Errno 98] Address already in use

I just wanted to try the ceph-dash in my openstack env. But seemed the port 5000 has been used for other app. How to change the port for ceph-dash?

root@node-3:~/ceph-dash# ./ceph-dash.py

Traceback (most recent call last):
File "./ceph-dash.py", line 203, in
main()
File "./ceph-dash.py", line 199, in main
app.run(debug=False, host='0.0.0.0')
File "/usr/lib/python2.7/dist-packages/flask/app.py", line 772, in run
run_simple(host, port, self, *_options)
File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 614, in run_simple
inner()
File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 596, in inner
passthrough_errors, ssl_context).serve_forever()
File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 405, in make_server
passthrough_errors, ssl_context)
File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 331, in init
HTTPServer.init(self, (host, int(port)), handler)
File "/usr/lib/python2.7/SocketServer.py", line 408, in init
self.server_bind()
File "/usr/lib/python2.7/BaseHTTPServer.py", line 108, in server_bind
SocketServer.TCPServer.server_bind(self)
File "/usr/lib/python2.7/SocketServer.py", line 419, in server_bind
self.socket.bind(self.server_address)
File "/usr/lib/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(_args)
socket.error: [Errno 98] Address already in use

SSE/WebSocket support?

This is more an enhancement idea than a bug report - currently, the Web application seems to poll the server application for updates every 5 seconds. Have you considered using Server-Sent Events (SSE) or WebSockets instead? This might give the app a more "real-time" feeling and would avoid the polling.

Change port 5000

Hello,

Thanks for the awesome job.
Is there a way we can change the port number from 5000?

Data formatting for Graphite

Thank you for the ceph dashboard, it works great.
I also tried to implement the Graphite but how do you mutate the output of check-ceph-dash.py --url 'http://url/' and prepare it for graphite? I collect the data with Sensu which then should relay it to Graphite.

My output is below and it's not ready for Graphite:

WARNING: HEALTH_WARN: 326 pgs backfill
HEALTH_WARN: 7 pgs backfilling
HEALTH_WARN: 333 pgs stuck unclean
HEALTH_WARN: recovery 3886019/6281616 objects misplaced (61.863%)|bytes_total=71977097650176 num_pgs=3008 data_bytes=9291449512727 bytes_used=18667776380928 num_osds=18 op_per_sec=0 num_up_osds=18 num_in_osds=18 read_bytes_sec=0 write_bytes_sec=0 bytes_avail=53309321269248

Thank you.

Trouble executing ceph-dash.py on CentOS 6.5

Hi, I'm getting an error running ./ceph-dash.py on CentOS 6.5, python is 2.6 but I'm not sure if that's supported.

The error I'm getting is:

[root@mon01 ~/ceph-dash] # ./ceph-dash.py
Traceback (most recent call last):
File "./ceph-dash.py", line 129, in
main()
File "./ceph-dash.py", line 124, in main
app = CephAPI(name)
File "./ceph-dash.py", line 94, in init
self.jinja_env.filters['fmtbytes'] = fmtbytes
File "/usr/lib/python2.6/site-packages/flask/helpers.py", line 769, in get
value = self.func(obj)
File "/usr/lib/python2.6/site-packages/flask/app.py", line 561, in jinja_env
rv = self.create_jinja_environment()
File "/usr/lib/python2.6/site-packages/flask/app.py", line 635, in create_jinja_environment
rv = Environment(self, *_options)
File "/usr/lib/python2.6/site-packages/flask/templating.py", line 42, in init
BaseEnvironment.init(self, *_options)
File "/usr/lib64/python2.6/site-packages/jinja2/environment.py", line 269, in init
self.extensions = load_extensions(self, extensions)
File "/usr/lib64/python2.6/site-packages/jinja2/environment.py", line 73, in load_extensions
extension = import_string(extension)
File "/usr/lib64/python2.6/site-packages/jinja2/utils.py", line 195, in import_string
return getattr(import(module, None, None, [obj]), obj)
AttributeError: 'module' object has no attribute 'autoescape

Thanks in advance for any help!

[apache2] can't get ceph-dash to work with Apache/2.4.18

Hi,

I'm running Apache/2.4.18 and Ubuntu 16.04.1.

I followed the 'tutorial', using the /opt/ceph-dash/contrib/apache/cephdash file, but I get the error:

Internal Server Error

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

My /etc/apache2/sites-enabled/cephdash is currently this:

<VirtualHost *:80>
    ServerName dash.ceph.enterprise.com

    WSGIDaemonProcess cephdash user=www-data group=www-data processes=1 threads=5
    WSGIScriptAlias / /opt/ceph-dash/contrib/wsgi/cephdash.wsgi
    WSGIPassAuthorization On

    <Directory /opt/ceph-dash>
        WSGIProcessGroup cephdash
        WSGIApplicationGroup %{GLOBAL}
        Require all granted
    </Directory>
</VirtualHost>

Apache logs don't show anything. All files under the /opt/ceph-dash have the proper permissions (www-data:www-data).

Everything works fine when running the application through the /opt/ceph-dash/ceph-dash.py Flask script.

When replacing the "Require all granted" in the apache vhost configuration to the old style:

        Order deny,allow
        Allow from all

the apache error.log returns this:

[Mon Sep 26 16:23:14.161427 2016] [authz_core:error] [pid 18290:tid 140571006453504] [client 172.30.50.14:49856] AH01630: client denied by server configuration: /opt/ceph-dash/contrib/wsgi/cephdash.wsgi

My libapache2-mod-wsgi is currently in version 4.3.0-1.1build1.

Any tips regarding this?

Read/Write operations on Jewel

On Jewel the operations are split between Read and Write operations so the Ops field is empty. Is there already a way to check which underlying Ceph version is being used? I currently hacked in the operations in but I would like to supply a proper pull request that is backwards compatible.

"If you see this your monitoring system is scraping the wrong fields"

Since upgrading my monitors from luminous 12.2.1 to 12.2.2 I'm seeing the following warning in ceph-dash:

'ceph health' JSON format has changed in luminous. If you see this your monitoring system is scraping the wrong fields. Disable this with 'mon health preluminous compat warning = false'

ceph-dash.py script keeps crashing after a few minutes

I'm trying to run ceph-dash.py from my mon host, but it crashes every few minutes, and I have to restart it again. Has anyone seen this error before?

version of Ceph I'm using is 11.2.1 (Kraken).

Thanks in advance!

10.0.203.250 - - [20/Apr/2018 20:55:46] "GET / HTTP/1.1" 200 - 10.0.203.250 - - [20/Apr/2018 20:55:51] "GET / HTTP/1.1" 200 - 10.0.203.250 - - [20/Apr/2018 20:55:56] "GET / HTTP/1.1" 200 - /home/jenkins-build/build/workspace/ceph-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos7/DIST/centos7/MACHINE_SIZE/huge/release/11.2.1/rpm/el7/BUILD/ceph-11.2.1/src/common/ceph_crypto.cc: In function 'void ceph::crypto::init(CephContext*)' thread 7f99a3e53700 time 2018-04-20 20:56:01.773571 /home/jenkins-build/build/workspace/ceph-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos7/DIST/centos7/MACHINE_SIZE/huge/release/11.2.1/rpm/el7/BUILD/ceph-11.2.1/src/common/ceph_crypto.cc: 77: FAILED assert(crypto_context != __null)

ceph version 11.2.1 (e0354f9d3b1eea1d75a7dd487ba8098311be38a7) 1: (()+0x15b02e) [0x7f99a656b02e] 2: (()+0x2c2473) [0x7f99a66d2473] 3: (()+0x26eda5) [0x7f99a667eda5] 4: (()+0x26b730) [0x7f99a667b730] 5: (librados::RadosClient::connect()+0x30) [0x7f99a64d9420] 6: (rados_connect()+0x20) [0x7f99a648c6c0] 7: (()+0x237c2) [0x7f99aed597c2] 8: (PyObject_Call()+0x43) [0x7f99bb91b9a3] 9: (()+0x1b9d6) [0x7f99aed519d6] 10: (PyObject_Call()+0x43) [0x7f99bb91b9a3] 11: (PyObject_CallFunctionObjArgs()+0xbc) [0x7f99bb91c29c] 12: (PyEval_EvalFrameEx()+0x155b) [0x7f99bb9af31b] 13: (PyEval_EvalCodeEx()+0x7ed) [0x7f99bb9b6efd] 14: (()+0x7094d) [0x7f99bb94094d] 15: (PyObject_Call()+0x43) [0x7f99bb91b9a3] 16: (PyEval_EvalFrameEx()+0x17fd) [0x7f99bb9af5bd] 17: (PyEval_EvalCodeEx()+0x7ed) [0x7f99bb9b6efd] 18: (()+0x7094d) [0x7f99bb94094d] 19: (PyObject_Call()+0x43) [0x7f99bb91b9a3] 20: (PyEval_EvalFrameEx()+0x17fd) [0x7f99bb9af5bd] 21: (PyEval_EvalCodeEx()+0x7ed) [0x7f99bb9b6efd] 22: (()+0x7094d) [0x7f99bb94094d] 23: (PyObject_Call()+0x43) [0x7f99bb91b9a3] 24: (PyEval_EvalFrameEx()+0x17fd) [0x7f99bb9af5bd] 25: (PyEval_EvalFrameEx()+0x67bd) [0x7f99bb9b457d] 26: (PyEval_EvalFrameEx()+0x67bd) [0x7f99bb9b457d] 27: (PyEval_EvalFrameEx()+0x67bd) [0x7f99bb9b457d] 28: (PyEval_EvalCodeEx()+0x7ed) [0x7f99bb9b6efd] 29: (()+0x70858) [0x7f99bb940858] 30: (PyObject_Call()+0x43) [0x7f99bb91b9a3] 31: (()+0x5a995) [0x7f99bb92a995] 32: (PyObject_Call()+0x43) [0x7f99bb91b9a3] 33: (()+0xa2ce7) [0x7f99bb972ce7] 34: (PyObject_Call()+0x43) [0x7f99bb91b9a3] 35: (PyEval_EvalFrameEx()+0x2336) [0x7f99bb9b00f6] 36: (PyEval_EvalCodeEx()+0x7ed) [0x7f99bb9b6efd] 37: (()+0x70858) [0x7f99bb940858] 38: (PyObject_Call()+0x43) [0x7f99bb91b9a3] 39: (()+0x5a995) [0x7f99bb92a995] 40: (PyObject_Call()+0x43) [0x7f99bb91b9a3] 41: (()+0xa2ce7) [0x7f99bb972ce7] 42: (PyObject_Call()+0x43) [0x7f99bb91b9a3] 43: (PyEval_EvalFrameEx()+0x2336) [0x7f99bb9b00f6] 44: (()+0x661f8) [0x7f99bb9361f8] 45: (PyEval_EvalFrameEx()+0x1d41) [0x7f99bb9afb01] 46: (PyEval_EvalCodeEx()+0x7ed) [0x7f99bb9b6efd] 47: (PyEval_EvalFrameEx()+0x663c) [0x7f99bb9b43fc] 48: (PyEval_EvalCodeEx()+0x7ed) [0x7f99bb9b6efd] 49: (PyEval_EvalFrameEx()+0x663c) [0x7f99bb9b43fc] 50: (PyEval_EvalCodeEx()+0x7ed) [0x7f99bb9b6efd] 51: (PyEval_EvalFrameEx()+0x663c) [0x7f99bb9b43fc] 52: (PyEval_EvalCodeEx()+0x7ed) [0x7f99bb9b6efd] 53: (()+0x70858) [0x7f99bb940858] 54: (PyObject_Call()+0x43) [0x7f99bb91b9a3] 55: (()+0x5a995) [0x7f99bb92a995] 56: (PyObject_Call()+0x43) [0x7f99bb91b9a3] 57: (PyEval_EvalFrameEx()+0x2336) [0x7f99bb9b00f6] 58: (PyEval_EvalCodeEx()+0x7ed) [0x7f99bb9b6efd] 59: (PyEval_EvalFrameEx()+0x663c) [0x7f99bb9b43fc] 60: (PyEval_EvalCodeEx()+0x7ed) [0x7f99bb9b6efd] 61: (()+0x70858) [0x7f99bb940858] 62: (PyObject_Call()+0x43) [0x7f99bb91b9a3] 63: (()+0x5a995) [0x7f99bb92a995] 64: (PyObject_Call()+0x43) [0x7f99bb91b9a3] 65: (()+0xa2947) [0x7f99bb972947] 66: (()+0xa165f) [0x7f99bb97165f] 67: (PyObject_Call()+0x43) [0x7f99bb91b9a3] 68: (PyEval_EvalFrameEx()+0x2336) [0x7f99bb9b00f6] 69: (PyEval_EvalFrameEx()+0x67bd) [0x7f99bb9b457d] 70: (PyEval_EvalFrameEx()+0x67bd) [0x7f99bb9b457d] 71: (PyEval_EvalFrameEx()+0x67bd) [0x7f99bb9b457d] 72: (PyEval_EvalCodeEx()+0x7ed) [0x7f99bb9b6efd] 73: (()+0x70858) [0x7f99bb940858] 74: (PyObject_Call()+0x43) [0x7f99bb91b9a3] 75: (()+0x5a995) [0x7f99bb92a995] 76: (PyObject_Call()+0x43) [0x7f99bb91b9a3] 77: (PyEval_EvalFrameEx()+0x2336) [0x7f99bb9b00f6] 78: (PyEval_EvalCodeEx()+0x7ed) [0x7f99bb9b6efd] 79: (PyEval_EvalFrameEx()+0x663c) [0x7f99bb9b43fc] 80: (PyEval_EvalCodeEx()+0x7ed) [0x7f99bb9b6efd] 81: (()+0x70858) [0x7f99bb940858] 82: (PyObject_Call()+0x43) [0x7f99bb91b9a3] 83: (PyEval_CallObjectWithKeywords()+0x47) [0x7f99bb9ad7b7] 84: (()+0x1156e2) [0x7f99bb9e56e2] 85: (()+0x7e25) [0x7f99bb6bbe25] 86: (clone()+0x6d) [0x7f99bace034d] NOTE: a copy of the executable, orobjdump -rdS is needed to interpret this.

metrics are not visible

Hi all,

I've just installed the ceph-dash on a monitor and I copy-pasted the sample configuration file but the metrics section did not show anything on the dashboard

Help plzzzz
Cheers

Apache wsgi connect problem

Hello!

I try to configure my Apache to configure WSGI with Ceph Dash and I just receive this error bellow:

[Thu Apr 04 15:01:06.595353 2019] [wsgi:error] [pid 446881:tid 140022386288384] Traceback (most recent call last):
[Thu Apr 04 15:01:06.595358 2019] [wsgi:error] [pid 446881:tid 140022386288384]   File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1817, in wsgi_app
[Thu Apr 04 15:01:06.595362 2019] [wsgi:error] [pid 446881:tid 140022386288384]     response = self.full_dispatch_request()
[Thu Apr 04 15:01:06.595365 2019] [wsgi:error] [pid 446881:tid 140022386288384]   File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1477, in full_dispatch_request
[Thu Apr 04 15:01:06.595368 2019] [wsgi:error] [pid 446881:tid 140022386288384]     rv = self.handle_user_exception(e)
[Thu Apr 04 15:01:06.595371 2019] [wsgi:error] [pid 446881:tid 140022386288384]   File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1381, in handle_user_exception
[Thu Apr 04 15:01:06.595375 2019] [wsgi:error] [pid 446881:tid 140022386288384]     reraise(exc_type, exc_value, tb)
[Thu Apr 04 15:01:06.595377 2019] [wsgi:error] [pid 446881:tid 140022386288384]   File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1475, in full_dispatch_request
[Thu Apr 04 15:01:06.595380 2019] [wsgi:error] [pid 446881:tid 140022386288384]     rv = self.dispatch_request()
[Thu Apr 04 15:01:06.595383 2019] [wsgi:error] [pid 446881:tid 140022386288384]   File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1461, in dispatch_request
[Thu Apr 04 15:01:06.595386 2019] [wsgi:error] [pid 446881:tid 140022386288384]     return self.view_functions[rule.endpoint](**req.view_args)
[Thu Apr 04 15:01:06.595389 2019] [wsgi:error] [pid 446881:tid 140022386288384]   File "/usr/lib/python2.7/dist-packages/flask/views.py", line 84, in view
[Thu Apr 04 15:01:06.595406 2019] [wsgi:error] [pid 446881:tid 140022386288384]     return self.dispatch_request(*args, **kwargs)
[Thu Apr 04 15:01:06.595411 2019] [wsgi:error] [pid 446881:tid 140022386288384]   File "/usr/lib/python2.7/dist-packages/flask/views.py", line 149, in dispatch_request
[Thu Apr 04 15:01:06.595417 2019] [wsgi:error] [pid 446881:tid 140022386288384]     return meth(*args, **kwargs)
[Thu Apr 04 15:01:06.595420 2019] [wsgi:error] [pid 446881:tid 140022386288384]   File "/var/www/html/ceph-dash/contrib/wsgi/../../app/dashboard/views.py", line 112, in get
[Thu Apr 04 15:01:06.595423 2019] [wsgi:error] [pid 446881:tid 140022386288384]     with Rados(**self.clusterprop) as cluster:
[Thu Apr 04 15:01:06.595426 2019] [wsgi:error] [pid 446881:tid 140022386288384]   File "rados.pyx", line 595, in rados.Rados.__enter__ (/build/ceph-10.2.9/src/build/rados.c:7527)
[Thu Apr 04 15:01:06.595429 2019] [wsgi:error] [pid 446881:tid 140022386288384]   File "rados.pyx", line 785, in rados.Rados.connect (/build/ceph-10.2.9/src/build/rados.c:10073)
[Thu Apr 04 15:01:06.595432 2019] [wsgi:error] [pid 446881:tid 140022386288384] ObjectNotFound: error connecting to the cluster

When I try to access http://cephdash:5000 in my environment that's work without problem.

Ubuntu 16.04.2 LTS
Apache/2.4.18 (Ubuntu)

No operations per second

In the screenshots of the README.md we can see the operations-per-second metric. Is it expected that this metric can't be seen in a default deployment?

Broken pipe if monitor down

Hi,

first of all thanks for the great work, I love the REST API.

I run a cluster with three nodes and three monitors. If I restart a monitor for maintenance, ceph-dash hangs and shows empty output on the website. It does not happen for every monitor. It seems that ceph-dash is picking a “main” monitor and has problems switching over if this one fails. REST API is responding though, but with a huge delay, I measured between 20 and 25 seconds.
Example: I restart monitor 3, everything's fine. After monitor 3 is up again I restart monitor 2, ceph-dash hangs. If I restart monitor 2 again, everything's fine, ceph-dash seems to have switched to another monitor. Restarting monitor 1 after that leads to a freeze again, so ceph-dash switched to this monitor apparently.

Output of ceph-dash.py:

Jun 06 09:02:20 ceph-log ceph-dash.py[27784]: 127.0.0.1 - - [06/Jun/2017 09:02:20] "GET /ceph-dash HTTP/1.0" 200 -
Jun 06 09:02:20 ceph-log ceph-dash.py[27784]: Traceback (most recent call last):
Jun 06 09:02:20 ceph-log ceph-dash.py[27784]: File "/usr/lib/python2.7/SocketServer.py", line 295, in _handle_request_noblock
Jun 06 09:02:20 ceph-log ceph-dash.py[27784]: self.process_request(request, client_address)
Jun 06 09:02:20 ceph-log ceph-dash.py[27784]: File "/usr/lib/python2.7/SocketServer.py", line 321, in process_request
Jun 06 09:02:20 ceph-log ceph-dash.py[27784]: self.finish_request(request, client_address)
Jun 06 09:02:20 ceph-log ceph-dash.py[27784]: File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request
Jun 06 09:02:20 ceph-log ceph-dash.py[27784]: self.RequestHandlerClass(request, client_address, self)
Jun 06 09:02:20 ceph-log ceph-dash.py[27784]: File "/usr/lib/python2.7/SocketServer.py", line 657, in __init__
Jun 06 09:02:20 ceph-log ceph-dash.py[27784]: self.finish()
Jun 06 09:02:20 ceph-log ceph-dash.py[27784]: File "/usr/lib/python2.7/SocketServer.py", line 716, in finish
Jun 06 09:02:20 ceph-log ceph-dash.py[27784]: self.wfile.close()
Jun 06 09:02:20 ceph-log ceph-dash.py[27784]: File "/usr/lib/python2.7/socket.py", line 279, in close
Jun 06 09:02:20 ceph-log ceph-dash.py[27784]: self.flush()
Jun 06 09:02:20 ceph-log ceph-dash.py[27784]: File "/usr/lib/python2.7/socket.py", line 303, in flush
Jun 06 09:02:20 ceph-log ceph-dash.py[27784]: self._sock.sendall(view[write_offset:write_offset+buffer_size])
Jun 06 09:02:20 ceph-log ceph-dash.py[27784]: error: [Errno 32] Broken pipe
Jun 06 09:02:20 ceph-log ceph-dash.py[27784]: ----------------------------------------
Jun 06 09:02:20 ceph-log ceph-dash.py[27784]: Exception happened during processing of request from ('127.0.0.1', 59079)
Jun 06 09:02:20 ceph-log ceph-dash.py[27784]: ----------------------------------------

nginx and uwsgi deployment

Hi there,

I'm wondering if the process of serving the app via nginx/uwsgi has been documented anywhere? I know there's a quick start run through on httpd. I've been trying for a few days on and off and I can't even seem to get it to serve directly from the uwsgi server. Via nginx I get 502 socket file cannot be created. And via uwsgi I just get internal server error.

It's likely I'm doing something dumb but is the app set up to just plugin the uwsgi.ini into the server as long as it's pointing to the .wsgi file and the projectdir? It's a flask based app correct? I've run through a bit of the documentation and I should be able to serve it at a bear minimum with uwsgi.

I can run it fine with the ceph-dash.py file so all dependencies are met and the likes.

Any help or tuts you can direct me to that apply to the structure of this app and how it should be served sort of like a step by step so's I know I'm not fecking it up.

Trying to start with uwsgi:

uwsgi --http :5000 --chdir /etc/nginx/sites-enabled/ceph-dash/ --wsgi-file /etc/nginx/sites-enabled/ceph-dash/cephdash.wsgi --callable application --master --uid nginx --gid nginx

Server starts:

As you can see I added print statements to sys.path and application within the .wsgi to check it was loading and it finds what it needs apparently. But mountpoint is still empty.

*** Operational MODE: single process *** ['/etc/nginx/sites-enabled/ceph-dash/app/', '.', '', '/usr/lib64/python27.zip', '/usr/lib64/python2.7', '/usr/lib64/python2.7/plat-linux2', '/usr/lib64/python2.7/lib-tk', '/usr/lib64/python2.7/lib-old', '/usr/lib64/python2.7/lib-dynload', '/usr/lib64/python2.7/site-packages', '/usr/lib/python2.7/site-packages'] <Flask 'app'> WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0xe0b6d0 pid: 26487 (default app) *** uWSGI is running in multiple interpreter mode *** spawned uWSGI worker 1 (and the only) (pid: 26487, cores: 1)

Request gives internal server error:

[pid: 26487|app: 0|req: 1/1] 10.0.2.2 () {36 vars in 614 bytes} [Sun Aug 28 11:07:06 2016] GET / => generated 291 bytes in 49 msecs (HTTP/1.1 500) 2 headers in 84 bytes (1 switches on core 0)

Also tried with the .ini file:

uwsgi --ini uwsgi.ini

chdir           = /etc/nginx/sites-enabled/ceph-dash
wsgi-file       = /etc/nginx/sites-enabled/ceph-dash/cephdash.wsgi
enable-threads  = true
master          = true
processes       = 4
#socket          = /var/run/ceph-dash.socket
http        = :5000
#chmod-socket    = 664
vacuum          = true
uid             = nginx
gid             = nginx
daemonize       = /var/log/uwsgi/ceph-dash.log

What am I doing wrong? Pretty sure it's going to come down to either wrong file in wrong place or uwsgi not pointing to the correct place.

Cheers

can not work well with 15.2.5

I have install ceph 15.2.5 in centos7 by ceph-deploy. all goes well ,

ceph -s

cluster:
id: 7a9873c4-60b8-4481-b44b-c29154c406b0
health: HEALTH_WARN
Module 'restful' has failed dependency: No module named 'pecan'

services:
mon: 3 daemons, quorum ceph01,ceph02,ceph03 (age 19h)
mgr: ceph03(active, since 19h), standbys: ceph01, ceph02
mds: cephfs:1 {0=ceph01=up:active} 2 up:standby
osd: 3 osds: 3 up (since 19h), 3 in (since 10d)

task status:
scrub status:
mds.ceph01: idle

data:
pools: 5 pools, 129 pgs
objects: 29 objects, 693 KiB
usage: 3.2 GiB used, 22 TiB / 22 TiB avail
pgs: 129 active+clean

but enable dashboard failed。
[root@ceph01 ~]# ceph mgr module enable dashboard
Error ENOENT: all mgr daemons do not support module 'dashboard', pass --force to force enablement

so i try to use ceph-dash .

I run ceph-dash with docker :
[root@ceph01 ~]# docker run -d -p 5000:5000 -e CEPHMONS='10.188.32.12,10.188.32.13,10.188.32.14' -e KEYRING="$(sudo cat /etc/ceph/ceph.client.admin.keyring)" crapworks/ceph-dash:latest

but in the browers,I got err:

`KeyError
KeyError: 'osdmap'

Traceback (most recent call last)
File "/usr/lib64/python2.7/site-packages/flask/app.py", line 2464, in call
return self.wsgi_app(environ, start_response)
File "/cephdash/app/init.py", line 70, in call
return self.app(environ, start_response)
File "/usr/lib64/python2.7/site-packages/flask/app.py", line 2450, in wsgi_app
response = self.handle_exception(e)
File "/usr/lib64/python2.7/site-packages/flask/app.py", line 1867, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/lib64/python2.7/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/usr/lib64/python2.7/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/lib64/python2.7/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/lib64/python2.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/lib64/python2.7/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functionsrule.endpoint
File "/usr/lib64/python2.7/site-packages/flask/views.py", line 89, in view
return self.dispatch_request(*args, **kwargs)
File "/usr/lib64/python2.7/site-packages/flask/views.py", line 163, in dispatch_request
return meth(*args, **kwargs)
File "/cephdash/app/dashboard/views.py", line 118, in get
total_osds = cluster_status['osdmap']['osdmap']['num_osds']
KeyError: 'osdmap'
The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error.
To switch between the interactive traceback and the plaintext one, you can click on the "Traceback" headline. From the text traceback you can also create a paste of it. For code execution mouse-over the frame you want to debug and click on the console icon on the right side.

You can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection:

dump() shows all variables in the frame
dump(obj) dumps all that's known about the object
`

don't know where is the problem.

Need you help.

Ceph Dashboard pulling Graphite data but no graph

Hello,
First of all I just love your dashboard. Have been using it for a while now and it does what it is designed to do very well.
The issue that i am having right now is, I have finalyl setup Icinga+Graphite. Icinga pulling data from Ceph which can be viewed from graphite web. I have modified config.json in your ceph dashboard but it is not showing any data under Performance metrics block. Missing something? How should the target be pointed inside the config file?
Thanks!

read and write MB/sec not correct

I am trying to set up a single-node demo system for someone and am using the ceph-dash as a visual indicator (definitely the easiest ceph dashboard to get running!)
I am running separate rados bench read and write processes and I have noticed the MB/sec for reads and writes is often twice as big as the actual numbers reported by rados bench.

Now I am running rados bench on the same node where the osds reside, would that be causing the problem?

Also, in a related issue, with the above configuration of rados bench running on the same node, the reads/sec is often shown as zero.

Port conflict with ceph-rest-api

Port 5000 is used by both ceph-dash and ceph-rest-api. In addition, the port used by ceph-dash does not appear to be configurable. This prevents running ceph-dash on the same host as ceph-rest-api. I'd suggest using a different default port, as well as adding the option for the user to choose the port.

Dashboard information not displayed in 12.1.1 luminous

Hi,
I am currently using the docker you are providing here with a proof of concept cluster running luminous.

 ~]$ ceph tell mon.* version
mon.ceph1: ceph version 12.1.1 (f3e663a190bf2ed12c7e3cda288b9a159572c800) luminous (rc)
mon.ceph2: ceph version 12.1.1 (f3e663a190bf2ed12c7e3cda288b9a159572c800) luminous (rc)
mon.ceph3: ceph version 12.1.1 (f3e663a190bf2ed12c7e3cda288b9a159572c800) luminous (rc)

The first problem encountered is with the infamous line 317 :
timechekMons = data['health']['timechecks']['mons'];

As of 12.1.1, running ceph status --format=json returns :
,"health":{"checks":{"PG_NOT_SCRUBBED":{"severity":"HEALTH_WARN","message":"6 pgs not scrubbed for 86400"}}

The variable name seems to have changed.

So changing the JS to timechekMons = data['health']['checks']['mons']; solves that problem.

Onto the next problem :
line 229

    // CREATE A ALERT MESSAGE {{{
    function message(severity, msg) {
        if (severity == 'success') { icon = 'ok' }
        if (severity == 'warning') { icon = 'flash' }
        if (severity == 'danger') { icon = 'remove' }
        return '<div class="alert alert-' + severity + '"><strong><span class="glyphicon glyphicon-' + icon + '">&nbsp;</span>' + msg + '</strong></div>';
    }
    // }}}

At this point, severity is undefined, I do not understant why since I see : {"severity":"HEALTH_WARN"
in the json, which is a case you handle at line 246.

To bypass the problem, i set an else {icon = 'ok'} in the message function.

Then the next error arising is : TypeError: a is undefined at jquery-2.1.4.min.js:2:2724

Starting there, it is beyond my capabilities to keep going since I have basically no knowledge in web development.

Did I miss something about which versions of Ceph to use? What would you recommand?

Thanks a bunch!

No Monitor status when ceph cluster only have one monitor.

Hello, this is my ceph cluster.

$ ceph -s
    cluster 7530a176-e733-4b76-bc66-76c516157960
     health HEALTH_OK
     monmap e1: 1 mons at {B08-1-MS1=172.28.0.30:6789/0}
            election epoch 2, quorum 0 B08-1-MS1
     osdmap e26: 3 osds: 3 up, 3 in
      pgmap v383: 64 pgs, 1 pools, 49108 MB data, 12277 objects
            145 GB used, 10997 GB / 11142 GB avail
                  64 active+clean

$ ceph -v
ceph version 0.94.7 (d56bdf93ced6b80b07397d57e3fa68fe68304432)

When I run ./ceph-dash.py, I could not found any monitor status on Ceph Dashboard.

Here is my screenshot.
2016-09-01 2 44 23

And I try to add another monitor, finally I can see monitor status.

2016-09-01 2 49 02

Thanks!

Changing ceph-dash.py to listen on 0.0.0.0

Hi whats your thought on changing ceph-dash.py to listen on all ports by default

app.run(host='0.0.0.0', debug=True)

If we do this by default , will it break anything ? if not should you consider changing this in master branch ?

Thanks for beautiful ceph-dash.

docker image?

First, let me thank you for this great idea and the progress so far!

Now: any intentions to build an official docker image for this? It would be immensely useful to simplify deployment.

thanks!

ceph-dash : Does not shows dashboard , ends with error 500

{
"message": "'module' object has no attribute 'autoescape'",
"code": 500
}

Getting this error message while running ceph-dash.py , it looks like this is caused other then ceph-dash , as it worked for me on another monitor machine.

TimedOut: error connecting to the cluster

I deploy ceph-dash using apache. But i get error:

[Tue Jun 05 09:44:09.448973 2018] [:error] [pid 27465] ERROR:app:Exception on / [GET]
[Tue Jun 05 09:44:09.449026 2018] [:error] [pid 27465] Traceback (most recent call last):
[Tue Jun 05 09:44:09.449031 2018] [:error] [pid 27465] File "/usr/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
[Tue Jun 05 09:44:09.449034 2018] [:error] [pid 27465] response = self.full_dispatch_request()
[Tue Jun 05 09:44:09.449036 2018] [:error] [pid 27465] File "/usr/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
[Tue Jun 05 09:44:09.449038 2018] [:error] [pid 27465] rv = self.handle_user_exception(e)
[Tue Jun 05 09:44:09.449040 2018] [:error] [pid 27465] File "/usr/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
[Tue Jun 05 09:44:09.449056 2018] [:error] [pid 27465] reraise(exc_type, exc_value, tb)
[Tue Jun 05 09:44:09.449060 2018] [:error] [pid 27465] File "/usr/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
[Tue Jun 05 09:44:09.449062 2018] [:error] [pid 27465] rv = self.dispatch_request()
[Tue Jun 05 09:44:09.449063 2018] [:error] [pid 27465] File "/usr/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
[Tue Jun 05 09:44:09.449066 2018] [:error] [pid 27465] return self.view_functionsrule.endpoint
[Tue Jun 05 09:44:09.449067 2018] [:error] [pid 27465] File "/usr/lib/python2.7/site-packages/flask/views.py", line 84, in view
[Tue Jun 05 09:44:09.449069 2018] [:error] [pid 27465] return self.dispatch_request(*args, **kwargs)
[Tue Jun 05 09:44:09.449071 2018] [:error] [pid 27465] File "/usr/lib/python2.7/site-packages/flask/views.py", line 149, in dispatch_request
[Tue Jun 05 09:44:09.449073 2018] [:error] [pid 27465] return meth(*args, **kwargs)
[Tue Jun 05 09:44:09.449092 2018] [:error] [pid 27465] File "/var/www/html/ceph-dash/contrib/wsgi/../../app/dashboard/views.py", line 112, in get
[Tue Jun 05 09:44:09.449095 2018] [:error] [pid 27465] with Rados(**self.clusterprop) as cluster:
[Tue Jun 05 09:44:09.449096 2018] [:error] [pid 27465] File "rados.pyx", line 595, in rados.Rados.enter (rados.c:6875)
[Tue Jun 05 09:44:09.449098 2018] [:error] [pid 27465] File "rados.pyx", line 785, in rados.Rados.connect (rados.c:8969)
[Tue Jun 05 09:44:09.449100 2018] [:error] [pid 27465] TimedOut: error connecting to the cluster

Could you please give some suggestions?

[Feature request] Storage Utilization per Root (and Pool)

I like the simplicity and ease-of-use of ceph-dash a lot. Thanks for the great work and for sharing!

In our Ceph cluster we have several different pools and I'd love to see a bar chart / donut representing the utilization per pool instead of the existing overall storage utilization graph. If you are thinking about implementing something in that direction I'd be willing to support your work by donating to the project.

error: [Errno 98] Adresse déjà utilisée

ça fait une semaine que cet erreur me parait dans le console de l'eclipse et j'arrive pas à la résoudre, veuillez m'aider SVP!

2017-02-09 20:42:27,430 4361 INFO ? openerp: OpenERP version 9.0c
2017-02-09 20:42:27,430 4361 INFO ? openerp: addons paths: ['/home/lenovo/.local/share/Odoo/addons/9.0', u'/home/lenovo/git/odoo/openerp/addons', u'/home/lenovo/git/odoo/addons']
2017-02-09 20:42:27,430 4361 INFO ? openerp: database: default@default:default
2017-02-09 20:42:27,507 4361 INFO ? openerp.service.server: HTTP service (werkzeug) running on 0.0.0.0:8069
Exception in thread openerp.service.httpd:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/lenovo/git/odoo/openerp/service/server.py", line 247, in http_thread
self.httpd = ThreadedWSGIServerReloadable(self.interface, self.port, app)
File "/home/lenovo/git/odoo/openerp/service/server.py", line 106, in init
handler=RequestHandler)
File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 464, in init
HTTPServer.init(self, (host, int(port)), handler)
File "/usr/lib/python2.7/SocketServer.py", line 417, in init
self.server_bind()
File "/home/lenovo/git/odoo/openerp/service/server.py", line 116, in server_bind
super(ThreadedWSGIServerReloadable, self).server_bind()
File "/usr/lib/python2.7/BaseHTTPServer.py", line 108, in server_bind
SocketServer.TCPServer.server_bind(self)
File "/usr/lib/python2.7/SocketServer.py", line 431, in server_bind
self.socket.bind(self.server_address)
File "/usr/lib/python2.7/socket.py", line 228, in meth
return getattr(self._sock,name)(*args)
error: [Errno 98] Adresse déjà utilisée

Using in a docker compose file

When running a docker stack, the environment variables for a docker container have to be placed in a yaml file - something that can't be done (to my knowledge) with the keyring.

Would it be possible to allow the key to be entered as a string?

No performance metrics

If some one can answer however where do I find more information on this section so I can best layout the graphs?

"labels": [ "Read", "Write" ],
 "from": "-2h",
"mode": "byteRate"

FIXED HAHAHA I'm such a dumb ass. I was editing the wrong config.json -_- I turned up a test instance using flask at first before moving to apache. I was editing the config in the dev dir.

So for anyone that's wondering:

  • make sure the files in dir httpd is serving are owned by that user
  • the way these graphs are pulled in is via the graphite http rest api targets are passed to target
  • http://IPADDR:8080/render?target=servers.ceph-admin.cpu.cpu0.idle
  • So targets should direct be reachable from that url
  • it's port 8080 for me since that's where I'm hosting Graphite if you're on port 80 you wont need it or if you're on a different port add that in place

Thanks Crapworks awesome job btw

ORIGINAL THREAD:

Hi there, I hate being the one that has to ask but after a few days of fiddling I'm not sure if the issue is with ceph-dash or somewhere else. I can't pull cluster stats, or any stats into ceph-dash

I'm hosting it httpd ssl on centos 7, everything else seems to be functioning normally. For completeness I'll tell you It's a dev Graphite instance specifically for testing this, and a dev icinga2 as well. I can't seem to get anything to pull from graphite, I've tried graphs that I know work like avg(x.x.x.cpu.idle) as a test.

in config.json I've also tried all of these:

 url": "http://IPADDR:8080",
 url": "http://IPADDR:2003",
 url": "http://IPADDR",

Everything else seems to be. Just let me know what else you need from me. Firewalls are turned off and both nodes have full access to each other.

config.json

{
    "ceph_config": "/etc/ceph/ceph.conf",
    "graphite": {
        "url": "http://x.x.x.x", // obviously filled in, in my config
        "metrics": [
            {
                "targets": [
                    "avg(servers.ceph-admin.cpu.cpu0.idle)",
                    "avg(monitoring.ceph-mon*.ceph_overall_cluster_status.write_bytes_sec)"
                ],
                "labels": [ "Read", "Write" ],
                "from": "-2h",
                "mode": "byteRate"
            },
            {
                "targets": [
                    "avg(monitoring.ceph-mon*.ceph_overall_cluster_status.op_per_sec)"
                ],
                "labels": [ "IOPS" ],
                "colors": [ "#5bc0de" ],
                "from": "-2h"
            }
        ]
    }
}

This is what it looks like for me:

graphite-vs-ceph-dash

Couldn't display performance metrics

Hi Chris,

I'm trying to use ceph-dash to monitor the performance of my cepy-cluster. I followed the instructions to deploy the ceph-dash, but couldn't display the performance mertics. below is my config.json:
{
"ceph_config": "/etc/ceph/ceph.conf",
"graphite": {
"url": "http://xxx.xxx.28.10:8080",
"metrics": [
{
"targets": [
"avg(monitoring.ceph-mon_.ceph_overall_cluster_status.read_bytes_sec)",
"avg(monitoring.ceph-mon_.ceph_overall_cluster_status.write_bytes_sec)"
],
"labels": [ "Read", "Write" ],
"from": "-2h",
"mode": "byteRate"
},
{
"targets": [
"avg(monitoring.ceph-mon*.ceph_overall_cluster_status.op_per_sec)"
],
"labels": [ "IOPS" ],
"colors": [ "#5bc0de" ],
"from": "-2h"
}
]
}
}
I also couldn't open http://xxx.xxx.28.10:8080/render?target=monitoring.ceph-mon0.ceph_overall_cluster_status.read_bytes_sec.

would you please tell me where is wrong and how can I correct it?

thanks so much.

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.