├── debian ├── compat ├── docs ├── collectd-ceph1.dirs ├── source │ └── format ├── collectd-ceph.substvars ├── collectd-ceph1.install ├── collectd-ceph-dev.dirs ├── collectd-ceph.dirs ├── collectd-ceph.install ├── collectd-ceph-dev.install ├── rules ├── README.Debian ├── rules.dh7 ├── gbp.conf ├── control ├── changelog └── copyright ├── plugins ├── __init__.py ├── ceph_monitor_plugin.py ├── ceph_latency_plugin.py ├── ceph_pg_plugin.py ├── ceph_osd_plugin.py ├── ceph_pool_plugin.py └── base.py ├── public ├── ceph-dash2.png └── ceph-overview.png ├── .gitignore ├── docs └── ubuntu.md ├── README.md ├── LICENSE └── grafana └── ceph-overview.json /debian/compat: -------------------------------------------------------------------------------- 1 | 8 2 | -------------------------------------------------------------------------------- /plugins/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /debian/docs: -------------------------------------------------------------------------------- 1 | README.md 2 | -------------------------------------------------------------------------------- /debian/collectd-ceph1.dirs: -------------------------------------------------------------------------------- 1 | usr/lib 2 | -------------------------------------------------------------------------------- /debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (quilt) 2 | -------------------------------------------------------------------------------- /debian/collectd-ceph.substvars: -------------------------------------------------------------------------------- 1 | misc:Depends= 2 | -------------------------------------------------------------------------------- /debian/collectd-ceph1.install: -------------------------------------------------------------------------------- 1 | usr/lib/lib*.so.* 2 | -------------------------------------------------------------------------------- /debian/collectd-ceph-dev.dirs: -------------------------------------------------------------------------------- 1 | usr/lib 2 | usr/include 3 | -------------------------------------------------------------------------------- /debian/collectd-ceph.dirs: -------------------------------------------------------------------------------- 1 | usr/lib/collectd/plugins/ceph 2 | -------------------------------------------------------------------------------- /debian/collectd-ceph.install: -------------------------------------------------------------------------------- 1 | plugins/* /usr/lib/collectd/plugins/ceph 2 | -------------------------------------------------------------------------------- /public/ceph-dash2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochaporto/collectd-ceph/HEAD/public/ceph-dash2.png -------------------------------------------------------------------------------- /public/ceph-overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rochaporto/collectd-ceph/HEAD/public/ceph-overview.png -------------------------------------------------------------------------------- /debian/collectd-ceph-dev.install: -------------------------------------------------------------------------------- 1 | usr/include/* 2 | usr/lib/lib*.a 3 | usr/lib/lib*.so 4 | usr/lib/pkgconfig/* 5 | usr/share/pkgconfig/* 6 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # -*- makefile -*- 3 | 4 | # Uncomment this to turn on verbose mode. 5 | #export DH_VERBOSE=1 6 | 7 | %: 8 | dh $@ 9 | -------------------------------------------------------------------------------- /debian/README.Debian: -------------------------------------------------------------------------------- 1 | collectd-ceph for Debian 2 | ----------------------------- 3 | 4 | Test package for inclusion in debian/ubuntu. 5 | 6 | -- Ricardo Rocha Tue, 12 May 2014 11:03:37 +1200 7 | -------------------------------------------------------------------------------- /debian/rules.dh7: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # -*- makefile -*- 3 | # Sample debian/rules that uses debhelper. 4 | # This file was originally written by Joey Hess and Craig Small. 5 | # As a special exception, when this file is copied by dh-make into a 6 | # dh-make output file, you may use that output file without restriction. 7 | # This special exception was added by Craig Small in version 0.37 of dh-make. 8 | 9 | # Uncomment this to turn on verbose mode. 10 | #export DH_VERBOSE=1 11 | 12 | %: 13 | dh $@ 14 | -------------------------------------------------------------------------------- /debian/gbp.conf: -------------------------------------------------------------------------------- 1 | # 2 | # git-buildpackage 3 | # git-buildpackage --git-pbuilder 4 | # debsign -k${GPGKEY} ../build-area/*.changes 5 | # dupload ../build-area/*.changes 6 | # git-buildpackage --git-tag-only --git-tag --git-sign-tags 7 | # git push 8 | # git push --tag 9 | # 10 | [DEFAULT] 11 | upstream-branch = master 12 | debian-branch = debian/unstable 13 | pristine-tar = False 14 | 15 | [git-buildpackage] 16 | export-dir = ../build-area/ 17 | compression = xz 18 | builder = debuild -i -I -uc -us 19 | upstream-tag = %(version)s 20 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Source: collectd-ceph 2 | Section: net 3 | Priority: optional 4 | Maintainer: Ricardo Rocha 5 | Uploaders: Ricardo Rocha 6 | Build-Depends: debhelper (>= 9) 7 | Standards-Version: 3.9.3 8 | Homepage: https://github.com/rochaport/collectd-ceph 9 | 10 | Package: collectd-ceph 11 | Architecture: all 12 | Depends: ${shlibs:Depends}, ${misc:Depends}, ceph 13 | Description: Plugins for collectd stats monitoring of Ceph instances 14 | This package provides various plugins for collecting Ceph stats. 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *.swp 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | env/ 12 | bin/ 13 | build/ 14 | develop-eggs/ 15 | dist/ 16 | eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | *.egg-info/ 23 | .installed.cfg 24 | *.egg 25 | 26 | # Installer logs 27 | pip-log.txt 28 | pip-delete-this-directory.txt 29 | 30 | # Unit test / coverage reports 31 | htmlcov/ 32 | .tox/ 33 | .coverage 34 | .cache 35 | nosetests.xml 36 | coverage.xml 37 | 38 | # Translations 39 | *.mo 40 | 41 | # Mr Developer 42 | .mr.developer.cfg 43 | .project 44 | .pydevproject 45 | 46 | # Rope 47 | .ropeproject 48 | 49 | # Django stuff: 50 | *.log 51 | *.pot 52 | 53 | # Sphinx documentation 54 | docs/_build/ 55 | 56 | debian/collectd-ceph 57 | files 58 | -------------------------------------------------------------------------------- /debian/changelog: -------------------------------------------------------------------------------- 1 | collectd-ceph (0.4.0-1ubuntu1) precise; urgency=low 2 | 3 | * Added osd latency metrics and usage 4 | 5 | -- Ricardo Rocha Thu, 25 Sep 2014 15:08:52 +1200 6 | 7 | collectd-ceph (0.3.0-1ubuntu1) precise; urgency=low 8 | 9 | * Publish pool metadata stats (#17) 10 | * Fixed bugs: 11 | - #16: protect against failures in ceph latency plugin 12 | 13 | -- Ricardo Rocha Thu, 17 Jul 2014 15:08:52 +1200 14 | 15 | collectd-ceph (0.2.1-1ubuntu1) precise; urgency=low 16 | 17 | * Use shell processes when triggering subprocess. 18 | * Added __init__.py to plugin directory. 19 | 20 | -- Ricardo Rocha Tue, 08 Jul 2014 14:08:52 +1200 21 | 22 | collectd-ceph (0.2.0-1ubuntu1) precise; urgency=low 23 | 24 | * Added plugins for stats on monitors, osds, pools, pgs, latency 25 | 26 | -- Ricardo Rocha Fri, 23 May 2014 14:08:52 +1200 27 | 28 | collectd-ceph (0.1-1ubuntu1) precise; urgency=low 29 | 30 | * Initial release. 31 | 32 | -- Ricardo Rocha Tue, 12 May 2014 18:25:06 +0200 33 | -------------------------------------------------------------------------------- /docs/ubuntu.md: -------------------------------------------------------------------------------- 1 | # Ubuntu Packaging 2 | 3 | ## Building the collectd-ceph package 4 | 5 | [These instructions](http://packaging.ubuntu.com/html/packaging-new-software.html) should give full details. 6 | 7 | In summary, do this once to prepare your environment: 8 | ``` 9 | pbuilder-dist precise create 10 | ``` 11 | 12 | and for every release (from master): 13 | ``` 14 | rm -rf /tmp/build-collectd 15 | mkdir /tmp/build-collectd 16 | cd /tmp/build-collectd 17 | wget https://github.com/rochaporto/collectd-ceph/archive/master.zip 18 | unzip master.zip 19 | tar zcvf collectd-ceph-0.2.0.tar.gz collectd-ceph-master/ 20 | bzr dh-make collectd-ceph 0.2.0 collectd-ceph-0.2.0.tar.gz 21 | cd collectd-ceph 22 | bzr builddeb -S 23 | cd ../build-area 24 | pbuilder-dist precise build collectd-ceph_0.2.0-1ubuntu1.dsc 25 | dput ppa:rocha-porto/collectd ../collectd-ceph_0.2.0-1ubuntu1_source.changes 26 | ``` 27 | 28 | ## Rebuilding a newer collectd version for precise 29 | 30 | ``` 31 | bzr branch lp:ubuntu/saucy/collectd 32 | sudo apt-get build-dep collectd 33 | cd collectd/ 34 | dch -i 35 | bzr bd -- -S -us -uc 36 | cd ../ 37 | debsign collectd_5.1.0-3.1ubuntu4_source.changes 38 | dput -f ppa:rocha-porto/collectd5-precise collectd_5.1.0-3.1ubuntu4_source.changes 39 | ``` 40 | 41 | ## Rebuilding from another ppa 42 | 43 | ``` 44 | add-apt-repository ppa:user/ppa-name 45 | apt-get source collectd=5.3.0 46 | cd collectd-5.3.0/ 47 | dpkg-buildpackage -rfakeroot -d -us -uc -S 48 | cd .. 49 | debsign collectd_5.3.0_source.changes 50 | dput -f ppa:rocha-porto/collectd5precise collectd_5.3.0_source.changes 51 | ``` 52 | -------------------------------------------------------------------------------- /debian/copyright: -------------------------------------------------------------------------------- 1 | Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ 2 | Upstream-Name: collectd-ceph 3 | Source: https://github.com/rochaporto/collectd-ceph 4 | 5 | Files: * 6 | Copyright: 7 | 8 | License: 9 | 10 | 11 | . 12 | 13 | 14 | # If you want to use GPL v2 or later for the /debian/* files use 15 | # the following clauses, or change it to suit. Delete these two lines 16 | Files: debian/* 17 | Copyright: 2014 Ricardo Rocha 18 | License: GPL-2+ 19 | This package is free software; you can redistribute it and/or modify 20 | it under the terms of the GNU General Public License as published by 21 | the Free Software Foundation; either version 2 of the License, or 22 | (at your option) any later version. 23 | . 24 | This package is distributed in the hope that it will be useful, 25 | but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | GNU General Public License for more details. 28 | . 29 | You should have received a copy of the GNU General Public License 30 | along with this program. If not, see 31 | . 32 | On Debian systems, the complete text of the GNU General 33 | Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". 34 | 35 | # Please also look if there are files or directories which have a 36 | # different copyright/license attached and list them here. 37 | # Please avoid to pick license terms that are more restrictive than the 38 | # packaged work, as it may make Debian's contributions unacceptable upstream. 39 | -------------------------------------------------------------------------------- /plugins/ceph_monitor_plugin.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # vim: tabstop=4 shiftwidth=4 4 | 5 | # This program is free software; you can redistribute it and/or modify it 6 | # under the terms of the GNU General Public License as published by the 7 | # Free Software Foundation; only version 2 of the License is applicable. 8 | # 9 | # This program is distributed in the hope that it will be useful, but 10 | # WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | # General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License along 15 | # with this program; if not, write to the Free Software Foundation, Inc., 16 | # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | # 18 | # Authors: 19 | # Ricardo Rocha 20 | # 21 | # About this plugin: 22 | # This plugin collects information regarding Ceph Monitors. 23 | # 24 | # collectd: 25 | # http://collectd.org 26 | # collectd-python: 27 | # http://collectd.org/documentation/manpages/collectd-python.5.shtml 28 | # ceph mons: 29 | # http://ceph.com/docs/master/rados/operations/monitoring/#checking-monitor-status 30 | # 31 | 32 | import collectd 33 | import json 34 | import traceback 35 | import subprocess 36 | 37 | import base 38 | 39 | class CephMonPlugin(base.Base): 40 | 41 | def __init__(self): 42 | base.Base.__init__(self) 43 | self.prefix = 'ceph' 44 | 45 | def get_stats(self): 46 | """Retrieves stats from ceph mons""" 47 | 48 | ceph_cluster = "%s-%s" % (self.prefix, self.cluster) 49 | 50 | data = { ceph_cluster: { 'mon': { 'number': 0, 'quorum': 0 } } } 51 | output = None 52 | try: 53 | cephmoncmdline='ceph mon dump --format json --cluster ' + self.cluster 54 | output = subprocess.check_output(cephmoncmdline, shell=True) 55 | except Exception as exc: 56 | collectd.error("ceph-mon: failed to ceph mon dump :: %s :: %s" 57 | % (exc, traceback.format_exc())) 58 | return 59 | 60 | if output is None: 61 | collectd.error('ceph-mon: failed to ceph mon dump :: output was None') 62 | 63 | json_data = json.loads(output) 64 | 65 | data[ceph_cluster]['mon']['number'] = len(json_data['mons']) 66 | data[ceph_cluster]['mon']['quorum'] = len(json_data['quorum']) 67 | 68 | return data 69 | 70 | try: 71 | plugin = CephMonPlugin() 72 | except Exception as exc: 73 | collectd.error("ceph-mon: failed to initialize ceph mon plugin :: %s :: %s" 74 | % (exc, traceback.format_exc())) 75 | 76 | def configure_callback(conf): 77 | """Received configuration information""" 78 | plugin.config_callback(conf) 79 | 80 | def read_callback(): 81 | """Callback triggerred by collectd on read""" 82 | plugin.read_callback() 83 | 84 | collectd.register_config(configure_callback) 85 | collectd.register_read(read_callback, plugin.interval) 86 | 87 | -------------------------------------------------------------------------------- /plugins/ceph_latency_plugin.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # vim: tabstop=4 shiftwidth=4 4 | 5 | # This program is free software; you can redistribute it and/or modify it 6 | # under the terms of the GNU General Public License as published by the 7 | # Free Software Foundation; only version 2 of the License is applicable. 8 | # 9 | # This program is distributed in the hope that it will be useful, but 10 | # WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | # General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License along 15 | # with this program; if not, write to the Free Software Foundation, Inc., 16 | # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | # 18 | # Authors: 19 | # Ricardo Rocha 20 | # 21 | # About this plugin: 22 | # This plugin evaluates current latency to write to the test pool. 23 | # 24 | # collectd: 25 | # http://collectd.org 26 | # collectd-python: 27 | # http://collectd.org/documentation/manpages/collectd-python.5.shtml 28 | # ceph pools: 29 | # https://ceph.com/docs/master/man/8/rados/#pool-specific-commands 30 | # 31 | 32 | import collectd 33 | import traceback 34 | import subprocess 35 | 36 | import base 37 | 38 | class CephLatencyPlugin(base.Base): 39 | 40 | def __init__(self): 41 | base.Base.__init__(self) 42 | self.prefix = 'ceph' 43 | 44 | def get_stats(self): 45 | """Retrieves stats regarding latency to write to a test pool""" 46 | 47 | ceph_cluster = "%s-%s" % (self.prefix, self.cluster) 48 | 49 | data = { ceph_cluster: {} } 50 | 51 | output = None 52 | try: 53 | output = subprocess.check_output( 54 | "timeout 30s rados --cluster "+ self.cluster +" -p data bench 10 write -t 1 -b 65536 2>/dev/null | grep -i latency | awk '{print 1000*$3}'", shell=True) 55 | except Exception as exc: 56 | collectd.error("ceph-latency: failed to run rados bench :: %s :: %s" 57 | % (exc, traceback.format_exc())) 58 | return 59 | 60 | if output is None: 61 | collectd.error('ceph-latency: failed to run rados bench :: output was None') 62 | 63 | results = output.split('\n') 64 | # push values 65 | data[ceph_cluster]['cluster'] = {} 66 | data[ceph_cluster]['cluster']['avg_latency'] = results[0] 67 | data[ceph_cluster]['cluster']['stddev_latency'] = results[1] 68 | data[ceph_cluster]['cluster']['max_latency'] = results[2] 69 | data[ceph_cluster]['cluster']['min_latency'] = results[3] 70 | 71 | return data 72 | 73 | try: 74 | plugin = CephLatencyPlugin() 75 | except Exception as exc: 76 | collectd.error("ceph-latency: failed to initialize ceph latency plugin :: %s :: %s" 77 | % (exc, traceback.format_exc())) 78 | 79 | def configure_callback(conf): 80 | """Received configuration information""" 81 | plugin.config_callback(conf) 82 | 83 | def read_callback(): 84 | """Callback triggerred by collectd on read""" 85 | plugin.read_callback() 86 | 87 | collectd.register_config(configure_callback) 88 | collectd.register_read(read_callback, plugin.interval) 89 | 90 | -------------------------------------------------------------------------------- /plugins/ceph_pg_plugin.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # vim: tabstop=4 shiftwidth=4 4 | 5 | # This program is free software; you can redistribute it and/or modify it 6 | # under the terms of the GNU General Public License as published by the 7 | # Free Software Foundation; only version 2 of the License is applicable. 8 | # 9 | # This program is distributed in the hope that it will be useful, but 10 | # WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | # General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License along 15 | # with this program; if not, write to the Free Software Foundation, Inc., 16 | # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | # 18 | # Authors: 19 | # Ricardo Rocha 20 | # 21 | # About this plugin: 22 | # This plugin collects information regarding Ceph Placement Groups (PGs). 23 | # 24 | # collectd: 25 | # http://collectd.org 26 | # collectd-python: 27 | # http://collectd.org/documentation/manpages/collectd-python.5.shtml 28 | # 29 | 30 | import collectd 31 | import json 32 | import traceback 33 | import subprocess 34 | 35 | import base 36 | 37 | class CephPGPlugin(base.Base): 38 | 39 | def __init__(self): 40 | base.Base.__init__(self) 41 | self.prefix = 'ceph' 42 | 43 | def get_stats(self): 44 | """Retrieves stats from ceph pgs""" 45 | 46 | ceph_cluster = "%s-%s" % (self.prefix, self.cluster) 47 | 48 | data = { ceph_cluster: { 'pg': { } } } 49 | output = None 50 | try: 51 | cephpg_cmdline='ceph pg dump --format json --cluster '+ self.cluster 52 | output = subprocess.check_output(cephpg_cmdline, shell=True) 53 | except Exception as exc: 54 | collectd.error("ceph-pg: failed to ceph pg dump :: %s :: %s" 55 | % (exc, traceback.format_exc())) 56 | return 57 | 58 | if output is None: 59 | collectd.error('ceph-pg: failed to ceph osd dump :: output was None') 60 | 61 | json_data = json.loads(output) 62 | 63 | pg_data = data[ceph_cluster]['pg'] 64 | # number of pgs in each possible state 65 | for pg in json_data['pg_stats']: 66 | for state in pg['state'].split('+'): 67 | if not pg_data.has_key(state): 68 | pg_data[state] = 0 69 | pg_data[state] += 1 70 | 71 | # osd perf data 72 | for osd in json_data['osd_stats']: 73 | osd_id = "osd-%s" % osd['osd'] 74 | data[ceph_cluster][osd_id] = {} 75 | data[ceph_cluster][osd_id]['kb_used'] = osd['kb_used'] 76 | data[ceph_cluster][osd_id]['kb_total'] = osd['kb'] 77 | data[ceph_cluster][osd_id]['snap_trim_queue_len'] = osd['snap_trim_queue_len'] 78 | data[ceph_cluster][osd_id]['num_snap_trimming'] = osd['num_snap_trimming'] 79 | data[ceph_cluster][osd_id]['apply_latency_ms'] = osd['fs_perf_stat']['apply_latency_ms'] 80 | data[ceph_cluster][osd_id]['commit_latency_ms'] = osd['fs_perf_stat']['commit_latency_ms'] 81 | 82 | return data 83 | 84 | try: 85 | plugin = CephPGPlugin() 86 | except Exception as exc: 87 | collectd.error("ceph-pg: failed to initialize ceph pg plugin :: %s :: %s" 88 | % (exc, traceback.format_exc())) 89 | 90 | def configure_callback(conf): 91 | """Received configuration information""" 92 | plugin.config_callback(conf) 93 | 94 | def read_callback(): 95 | """Callback triggerred by collectd on read""" 96 | plugin.read_callback() 97 | 98 | collectd.register_config(configure_callback) 99 | collectd.register_read(read_callback, plugin.interval) 100 | 101 | -------------------------------------------------------------------------------- /plugins/ceph_osd_plugin.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # vim: tabstop=4 shiftwidth=4 4 | 5 | # This program is free software; you can redistribute it and/or modify it 6 | # under the terms of the GNU General Public License as published by the 7 | # Free Software Foundation; only version 2 of the License is applicable. 8 | # 9 | # This program is distributed in the hope that it will be useful, but 10 | # WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | # General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License along 15 | # with this program; if not, write to the Free Software Foundation, Inc., 16 | # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | # 18 | # Authors: 19 | # Ricardo Rocha 20 | # 21 | # About this plugin: 22 | # This plugin collects information regarding Ceph OSDs. 23 | # 24 | # collectd: 25 | # http://collectd.org 26 | # collectd-python: 27 | # http://collectd.org/documentation/manpages/collectd-python.5.shtml 28 | # ceph osds: 29 | # http://ceph.com/docs/master/rados/operations/monitoring/#checking-osd-status 30 | # 31 | 32 | import collectd 33 | import json 34 | import traceback 35 | import subprocess 36 | 37 | import base 38 | 39 | class CephOsdPlugin(base.Base): 40 | 41 | def __init__(self): 42 | base.Base.__init__(self) 43 | self.prefix = 'ceph' 44 | 45 | def get_stats(self): 46 | """Retrieves stats from ceph osds""" 47 | 48 | ceph_cluster = "%s-%s" % (self.prefix, self.cluster) 49 | 50 | data = { ceph_cluster: { 51 | 'pool': { 'number': 0 }, 52 | 'osd': { 'up': 0, 'in': 0, 'down': 0, 'out': 0} 53 | } } 54 | output = None 55 | try: 56 | cephosdcmdline='ceph osd dump --format json --cluster ' + self.cluster 57 | output = subprocess.check_output(cephosdcmdline, shell=True) 58 | except Exception as exc: 59 | collectd.error("ceph-osd: failed to ceph osd dump :: %s :: %s" 60 | % (exc, traceback.format_exc())) 61 | return 62 | 63 | if output is None: 64 | collectd.error('ceph-osd: failed to ceph osd dump :: output was None') 65 | 66 | json_data = json.loads(output) 67 | 68 | # number of pools 69 | data[ceph_cluster]['pool']['number'] = len(json_data['pools']) 70 | 71 | # pool metadata 72 | for pool in json_data['pools']: 73 | pool_name = "pool-%s" % pool['pool_name'] 74 | data[ceph_cluster][pool_name] = {} 75 | data[ceph_cluster][pool_name]['size'] = pool['size'] 76 | data[ceph_cluster][pool_name]['pg_num'] = pool['pg_num'] 77 | data[ceph_cluster][pool_name]['pgp_num'] = pool['pg_placement_num'] 78 | 79 | osd_data = data[ceph_cluster]['osd'] 80 | # number of osds in each possible state 81 | for osd in json_data['osds']: 82 | if osd['up'] == 1: 83 | osd_data['up'] += 1 84 | else: 85 | osd_data['down'] += 1 86 | if osd['in'] == 1: 87 | osd_data['in'] += 1 88 | else: 89 | osd_data['out'] += 1 90 | 91 | return data 92 | 93 | try: 94 | plugin = CephOsdPlugin() 95 | except Exception as exc: 96 | collectd.error("ceph-osd: failed to initialize ceph osd plugin :: %s :: %s" 97 | % (exc, traceback.format_exc())) 98 | 99 | def configure_callback(conf): 100 | """Received configuration information""" 101 | plugin.config_callback(conf) 102 | 103 | def read_callback(): 104 | """Callback triggerred by collectd on read""" 105 | plugin.read_callback() 106 | 107 | collectd.register_config(configure_callback) 108 | collectd.register_read(read_callback, plugin.interval) 109 | 110 | -------------------------------------------------------------------------------- /plugins/ceph_pool_plugin.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # vim: tabstop=4 shiftwidth=4 4 | 5 | # This program is free software; you can redistribute it and/or modify it 6 | # under the terms of the GNU General Public License as published by the 7 | # Free Software Foundation; only version 2 of the License is applicable. 8 | # 9 | # This program is distributed in the hope that it will be useful, but 10 | # WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | # General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License along 15 | # with this program; if not, write to the Free Software Foundation, Inc., 16 | # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | # 18 | # Authors: 19 | # Ricardo Rocha 20 | # 21 | # About this plugin: 22 | # This plugin collects information regarding Ceph pools. 23 | # 24 | # collectd: 25 | # http://collectd.org 26 | # collectd-python: 27 | # http://collectd.org/documentation/manpages/collectd-python.5.shtml 28 | # ceph pools: 29 | # http://ceph.com/docs/master/rados/operations/pools/ 30 | # 31 | 32 | import collectd 33 | import json 34 | import traceback 35 | import subprocess 36 | 37 | import base 38 | 39 | class CephPoolPlugin(base.Base): 40 | 41 | def __init__(self): 42 | base.Base.__init__(self) 43 | self.prefix = 'ceph' 44 | 45 | def get_stats(self): 46 | """Retrieves stats from ceph pools""" 47 | 48 | ceph_cluster = "%s-%s" % (self.prefix, self.cluster) 49 | 50 | data = { ceph_cluster: {} } 51 | 52 | stats_output = None 53 | try: 54 | osd_pool_cmdline='ceph osd pool stats -f json --cluster ' + self.cluster 55 | stats_output = subprocess.check_output(osd_pool_cmdline, shell=True) 56 | cephdf_cmdline='ceph df -f json --cluster ' + self.cluster 57 | df_output = subprocess.check_output(ceph_dfcmdline, shell=True) 58 | except Exception as exc: 59 | collectd.error("ceph-pool: failed to ceph pool stats :: %s :: %s" 60 | % (exc, traceback.format_exc())) 61 | return 62 | 63 | if stats_output is None: 64 | collectd.error('ceph-pool: failed to ceph osd pool stats :: output was None') 65 | 66 | if df_output is None: 67 | collectd.error('ceph-pool: failed to ceph df :: output was None') 68 | 69 | json_stats_data = json.loads(stats_output) 70 | json_df_data = json.loads(df_output) 71 | 72 | # push osd pool stats results 73 | for pool in json_stats_data: 74 | pool_key = "pool-%s" % pool['pool_name'] 75 | data[ceph_cluster][pool_key] = {} 76 | pool_data = data[ceph_cluster][pool_key] 77 | for stat in ('read_bytes_sec', 'write_bytes_sec', 'op_per_sec'): 78 | pool_data[stat] = pool['client_io_rate'][stat] if pool['client_io_rate'].has_key(stat) else 0 79 | 80 | # push df results 81 | for pool in json_df_data['pools']: 82 | pool_data = data[ceph_cluster]["pool-%s" % pool['name']] 83 | for stat in ('bytes_used', 'kb_used', 'objects'): 84 | pool_data[stat] = pool['stats'][stat] if pool['stats'].has_key(stat) else 0 85 | 86 | # push totals from df 87 | data[ceph_cluster]['cluster'] = {} 88 | if json_df_data['stats'].has_key('total_bytes'): 89 | # ceph 0.84+ 90 | data[ceph_cluster]['cluster']['total_space'] = int(json_df_data['stats']['total_bytes']) 91 | data[ceph_cluster]['cluster']['total_used'] = int(json_df_data['stats']['total_used_bytes']) 92 | data[ceph_cluster]['cluster']['total_avail'] = int(json_df_data['stats']['total_avail_bytes']) 93 | else: 94 | # ceph < 0.84 95 | data[ceph_cluster]['cluster']['total_space'] = int(json_df_data['stats']['total_space']) * 1024.0 96 | data[ceph_cluster]['cluster']['total_used'] = int(json_df_data['stats']['total_used']) * 1024.0 97 | data[ceph_cluster]['cluster']['total_avail'] = int(json_df_data['stats']['total_avail']) * 1024.0 98 | 99 | return data 100 | 101 | try: 102 | plugin = CephPoolPlugin() 103 | except Exception as exc: 104 | collectd.error("ceph-pool: failed to initialize ceph pool plugin :: %s :: %s" 105 | % (exc, traceback.format_exc())) 106 | 107 | def configure_callback(conf): 108 | """Received configuration information""" 109 | plugin.config_callback(conf) 110 | 111 | def read_callback(): 112 | """Callback triggerred by collectd on read""" 113 | plugin.read_callback() 114 | 115 | collectd.register_config(configure_callback) 116 | collectd.register_read(read_callback, plugin.interval) 117 | 118 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | collectd-ceph 2 | ================== 3 | 4 | ## Overview 5 | 6 | A set of collectd plugins monitoring and publishing metrics for Ceph components. 7 | 8 | ## Screenshots 9 | 10 | Sample Grafana dashboard displaying common metrics from the plugins. 11 | 12 | ![image](https://raw.github.com/rochaporto/collectd-ceph/master/public/ceph-overview.png) 13 | 14 | ![image](https://raw.github.com/rochaporto/collectd-ceph/master/public/ceph-dash2.png) 15 | 16 | [Check here](grafana/ceph-overview.json) for the dashboard definition. 17 | 18 | ## Plugins and Metrics 19 | 20 | There are several plugins, usually mapping to the ceph command line tools. 21 | 22 | Find below a list of the available plugins and the metrics they publish. 23 | 24 | * ceph_monitor_plugin 25 | * ceph-<cluster>.mon.gauge.number (total number of monitors) 26 | * ceph-<cluster>.mon.gauge.quorum (number of monitors in quorum) 27 | * ceph_osd_plugin 28 | * ceph-<cluster>.osd.gauge.up (number of osds 'up') 29 | * ceph-<cluster>.osd.gauge.down (number of osds 'down') 30 | * ceph-<cluster>.osd.gauge.in (number of osds 'in') 31 | * ceph-<cluster>.osd.gauge.out (number of osds 'out') 32 | * ceph_pool_plugin 33 | * ceph-<cluster>.pool-<name>.gauge.read_bytes_sec (per pool read bytes/sec) 34 | * ceph-<cluster>.pool-<name>.gauge.write_bytes_sec (per pool write bytes/sec) 35 | * ceph-<cluster>.pool-<name>.gauge.op_per_sec (per pool iops) 36 | * ceph-<cluster>.pool-<name>.gauge.bytes_used (per pool bytes used) 37 | * ceph-<cluster>.pool-<name>.gauge.kb_used (per pool KBytes used) 38 | * ceph-<cluster>.pool-<name>.gauge.objects (per pool number of objects) 39 | * ceph-<cluster>.cluster.gauge.total_avail (cluster space available) 40 | * ceph-<cluster>.cluster.gauge.total_space (cluster total raw space) 41 | * ceph-<cluster>.cluster.gauge.total_used (cluster raw space used) 42 | * ceph_pg_plugin 43 | * ceph-<cluster>.pg.gauge.<state> (number of pgs in <state>) 44 | * ceph-<cluster>.osd-<id>.gauge.fs_commit_latency (fs commit latency for osd) 45 | * ceph-<cluster>.osd-<id>.gauge.apply_commit_latency (apply commit latency for osd) 46 | * ceph-<cluster>.osd-<id>.gauge.kb_used (kb used by osd) 47 | * ceph-<cluster>.osd-<id>.gauge.kb (total space of osd) 48 | * ceph_latency_plugin 49 | * ceph-<cluster>.cluster.gauge.avg_latency (avg cluster latency) 50 | * ceph-<cluster>.cluster.gauge.max_latency (max cluster latency) 51 | * ceph-<cluster>.cluster.gauge.min_latency (min cluster latency) 52 | * ceph-<cluster>.cluster.gauge.stddev_latency (stddev of cluster latency) 53 | 54 | ## Requirements 55 | 56 | It assumes an existing installation of [collectd](http://collectd.org/documentation.shtml) - check docs for details. 57 | 58 | If you want to publish to [graphite](http://graphite.readthedocs.org/), configure the [write_graphite](https://collectd.org/wiki/index.php/Plugin:Write_Graphite) collectd plugin. 59 | 60 | And you might want the awesome [grafana](http://grafana.org) too, which provides awesome displays. 61 | 62 | ## Setup and Configuration 63 | 64 | The example configuration(s) below assume the plugins to be located under `/usr/lib/collectd/plugins/ceph`. 65 | 66 | If you're under ubuntu, consider installing from [this ppa](https://launchpad.net/~rocha-porto/+archive/collectd). 67 | 68 | Each plugin should have its own config file, under `/etc/collectd/conf.d/.conf`, which 69 | should follow something similar to: 70 | ``` 71 | # cat /etc/collectd/conf.d/ceph_pool.conf 72 | 73 | 74 | Globals true 75 | 76 | 77 | 78 | ModulePath "/usr/lib/collectd/plugins/ceph" 79 | 80 | Import "ceph_pool_plugin" 81 | 82 | 83 | Verbose "True" 84 | Cluster "ceph" 85 | Interval "60" 86 | TestPool "test" 87 | 88 | 89 | ``` 90 | 91 | ### Puppet 92 | 93 | If you use puppet for configuration, then try this excelent [collectd](https://github.com/pdxcat/puppet-module-collectd) module. 94 | 95 | It has plenty of docs on how to use it, but for our specific plugins: 96 | ``` 97 | collectd::plugin::python { 'ceph_pool': 98 | modulepath => '/usr/lib/collectd/plugins/ceph', 99 | module => 'ceph_pool_plugin', 100 | config => { 101 | 'Verbose' => 'true', 102 | 'Cluster' => 'ceph', 103 | 'Interval' => 60, 104 | 'TestPool' => 'test', 105 | }, 106 | } 107 | ``` 108 | 109 | ### Docker 110 | 111 | Check [this repo](https://github.com/bobrik/ceph-collectd-graphite) for a nice docker setup to run collectd-ceph (thanks to Ian Babrou). 112 | 113 | ## Limitations 114 | 115 | The debian packaging files are provided, but not yet available in the official repos. 116 | 117 | ## Development 118 | 119 | All contributions more than welcome, just send pull requests. 120 | 121 | ## License 122 | 123 | GPLv2 (check LICENSE). 124 | 125 | ## Contributors 126 | 127 | Ricardo Rocha 128 | 129 | ## Support 130 | 131 | Please log tickets and issues at the [github home](https://github.com/rochaporto/collectd-ceph/issues). 132 | 133 | ## Additional Notes 134 | 135 | Some [handy instructions](docs/ubuntu.md) on how to build for ubuntu. 136 | -------------------------------------------------------------------------------- /plugins/base.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # vim: tabstop=4 shiftwidth=4 4 | 5 | # This program is free software; you can redistribute it and/or modify it 6 | # under the terms of the GNU General Public License as published by the 7 | # Free Software Foundation; only version 2 of the License is applicable. 8 | # 9 | # This program is distributed in the hope that it will be useful, but 10 | # WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | # General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License along 15 | # with this program; if not, write to the Free Software Foundation, Inc., 16 | # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | # 18 | # Authors: 19 | # Ricardo Rocha 20 | # 21 | # About this plugin: 22 | # Helper object for all plugins. 23 | # 24 | # collectd: 25 | # http://collectd.org 26 | # collectd-python: 27 | # http://collectd.org/documentation/manpages/collectd-python.5.shtml 28 | # 29 | 30 | import collectd 31 | import datetime 32 | import traceback 33 | 34 | class Base(object): 35 | 36 | def __init__(self): 37 | self.verbose = False 38 | self.debug = False 39 | self.prefix = '' 40 | self.cluster = 'ceph' 41 | self.testpool = 'test' 42 | self.interval = 60.0 43 | 44 | def config_callback(self, conf): 45 | """Takes a collectd conf object and fills in the local config.""" 46 | for node in conf.children: 47 | if node.key == "Verbose": 48 | if node.values[0] in ['True', 'true']: 49 | self.verbose = True 50 | elif node.key == "Debug": 51 | if node.values[0] in ['True', 'true']: 52 | self.debug = True 53 | elif node.key == "Prefix": 54 | self.prefix = node.values[0] 55 | elif node.key == 'Cluster': 56 | self.cluster = node.values[0] 57 | elif node.key == 'TestPool': 58 | self.testpool = node.values[0] 59 | elif node.key == 'Interval': 60 | self.interval = float(node.values[0]) 61 | else: 62 | collectd.warning("%s: unknown config key: %s" % (self.prefix, node.key)) 63 | 64 | def dispatch(self, stats): 65 | """ 66 | Dispatches the given stats. 67 | 68 | stats should be something like: 69 | 70 | {'plugin': {'plugin_instance': {'type': {'type_instance': , ...}}}} 71 | """ 72 | if not stats: 73 | collectd.error("%s: failed to retrieve stats" % self.prefix) 74 | return 75 | 76 | self.logdebug("dispatching %d new stats :: %s" % (len(stats), stats)) 77 | try: 78 | for plugin in stats.keys(): 79 | for plugin_instance in stats[plugin].keys(): 80 | for type in stats[plugin][plugin_instance].keys(): 81 | type_value = stats[plugin][plugin_instance][type] 82 | if not isinstance(type_value, dict): 83 | self.dispatch_value(plugin, plugin_instance, type, None, type_value) 84 | else: 85 | for type_instance in stats[plugin][plugin_instance][type].keys(): 86 | self.dispatch_value(plugin, plugin_instance, 87 | type, type_instance, 88 | stats[plugin][plugin_instance][type][type_instance]) 89 | except Exception as exc: 90 | collectd.error("%s: failed to dispatch values :: %s :: %s" 91 | % (self.prefix, exc, traceback.format_exc())) 92 | 93 | def dispatch_value(self, plugin, plugin_instance, type, type_instance, value): 94 | """Looks for the given stat in stats, and dispatches it""" 95 | self.logdebug("dispatching value %s.%s.%s.%s=%s" 96 | % (plugin, plugin_instance, type, type_instance, value)) 97 | 98 | val = collectd.Values(type='gauge') 99 | val.plugin=plugin 100 | val.plugin_instance=plugin_instance 101 | if type_instance is not None: 102 | val.type_instance="%s-%s" % (type, type_instance) 103 | else: 104 | val.type_instance=type 105 | val.values=[value] 106 | val.interval = self.interval 107 | val.dispatch() 108 | self.logdebug("sent metric %s.%s.%s.%s.%s" 109 | % (plugin, plugin_instance, type, type_instance, value)) 110 | 111 | def read_callback(self): 112 | try: 113 | start = datetime.datetime.now() 114 | stats = self.get_stats() 115 | self.logverbose("collectd new data from service :: took %d seconds" 116 | % (datetime.datetime.now() - start).seconds) 117 | except Exception as exc: 118 | collectd.error("%s: failed to get stats :: %s :: %s" 119 | % (self.prefix, exc, traceback.format_exc())) 120 | self.dispatch(stats) 121 | 122 | def get_stats(self): 123 | collectd.error('Not implemented, should be subclassed') 124 | 125 | def logverbose(self, msg): 126 | if self.verbose: 127 | collectd.info("%s: %s" % (self.prefix, msg)) 128 | 129 | def logdebug(self, msg): 130 | if self.debug: 131 | collectd.info("%s: %s" % (self.prefix, msg)) 132 | 133 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | {description} 294 | Copyright (C) {year} {fullname} 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | {signature of Ty Coon}, 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. -------------------------------------------------------------------------------- /grafana/ceph-overview.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Ceph Overview", 3 | "services": { 4 | "filter": { 5 | "list": [ 6 | { 7 | "type": "filter", 8 | "name": "cluster", 9 | "query": "collectd.*.ceph-*", 10 | "includeAll": true, 11 | "options": [ 12 | { 13 | "text": "All", 14 | "value": "*" 15 | }, 16 | { 17 | "text": "ceph-ceph", 18 | "value": "ceph-ceph" 19 | } 20 | ], 21 | "current": { 22 | "text": "All", 23 | "value": "*" 24 | } 25 | }, 26 | { 27 | "type": "filter", 28 | "name": "pool", 29 | "query": "collectd.*.*.pool-*", 30 | "includeAll": true, 31 | "options": [ 32 | { 33 | "text": "All", 34 | "value": "*" 35 | }, 36 | { 37 | "text": "pool-_intent-log", 38 | "value": "pool-_intent-log" 39 | }, 40 | { 41 | "text": "pool-_log", 42 | "value": "pool-_log" 43 | }, 44 | { 45 | "text": "pool-_rgw", 46 | "value": "pool-_rgw" 47 | }, 48 | { 49 | "text": "pool-_rgw_control", 50 | "value": "pool-_rgw_control" 51 | }, 52 | { 53 | "text": "pool-_rgw_gc", 54 | "value": "pool-_rgw_gc" 55 | }, 56 | { 57 | "text": "pool-_rgw_root", 58 | "value": "pool-_rgw_root" 59 | }, 60 | { 61 | "text": "pool-_usage", 62 | "value": "pool-_usage" 63 | }, 64 | { 65 | "text": "pool-_users", 66 | "value": "pool-_users" 67 | }, 68 | { 69 | "text": "pool-_users_email", 70 | "value": "pool-_users_email" 71 | }, 72 | { 73 | "text": "pool-_users_swift", 74 | "value": "pool-_users_swift" 75 | }, 76 | { 77 | "text": "pool-_users_uid", 78 | "value": "pool-_users_uid" 79 | }, 80 | { 81 | "text": "pool-data", 82 | "value": "pool-data" 83 | }, 84 | { 85 | "text": "pool-images", 86 | "value": "pool-images" 87 | }, 88 | { 89 | "text": "pool-metadata", 90 | "value": "pool-metadata" 91 | }, 92 | { 93 | "text": "pool-rbd", 94 | "value": "pool-rbd" 95 | }, 96 | { 97 | "text": "pool-volumes", 98 | "value": "pool-volumes" 99 | } 100 | ], 101 | "current": { 102 | "text": "All", 103 | "value": "*" 104 | } 105 | } 106 | ], 107 | "time": { 108 | "from": "now-1h", 109 | "to": "now" 110 | } 111 | } 112 | }, 113 | "rows": [ 114 | { 115 | "title": "Row1", 116 | "height": "300px", 117 | "editable": true, 118 | "collapse": false, 119 | "collapsable": true, 120 | "panels": [ 121 | { 122 | "span": 6, 123 | "editable": true, 124 | "type": "graphite", 125 | "loadingEditor": false, 126 | "datasource": null, 127 | "renderer": "flot", 128 | "x-axis": true, 129 | "y-axis": true, 130 | "scale": 1, 131 | "y_formats": [ 132 | "bytes", 133 | "none" 134 | ], 135 | "grid": { 136 | "max": null, 137 | "min": 0, 138 | "threshold1": null, 139 | "threshold2": null, 140 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 141 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 142 | }, 143 | "annotate": { 144 | "enable": false 145 | }, 146 | "resolution": 100, 147 | "lines": true, 148 | "fill": 0, 149 | "linewidth": 2, 150 | "points": false, 151 | "pointradius": 5, 152 | "bars": false, 153 | "stack": false, 154 | "legend": { 155 | "show": true, 156 | "values": true, 157 | "min": false, 158 | "max": false, 159 | "current": true, 160 | "total": false, 161 | "avg": false 162 | }, 163 | "percentage": false, 164 | "zerofill": true, 165 | "nullPointMode": "connected", 166 | "steppedLine": false, 167 | "tooltip": { 168 | "value_type": "cumulative", 169 | "query_as_alias": true 170 | }, 171 | "targets": [ 172 | { 173 | "target": "alias(sumSeries(collectd.*.[[cluster]].[[pool]].gauge.bytes_used),'Pool Used')", 174 | "hide": false 175 | }, 176 | { 177 | "target": "alias(divideSeries(sumSeries(collectd.*.[[cluster]].cluster.gauge.total_avail), averageSeries(collectd.*.[[cluster]].[[pool]].gauge.size)), 'Pool Available')", 178 | "hide": false 179 | }, 180 | { 181 | "target": "alias(collectd.*.[[cluster]].cluster.gauge.total_avail,'Raw Available')", 182 | "hide": false 183 | }, 184 | { 185 | "target": "alias(collectd.*.[[cluster]].cluster.gauge.total_used,'Raw Used')" 186 | }, 187 | { 188 | "target": "alias(collectd.*.[[cluster]].cluster.gauge.total_space,'Raw Total')", 189 | "hide": false 190 | } 191 | ], 192 | "aliasColors": { 193 | "Raw Total": "#BF1B00", 194 | "Raw Available": "#3F6833", 195 | "Pool Used": "#6ED0E0", 196 | "Pool Available": "#7EB26D", 197 | "Raw Used": "#0A50A1" 198 | }, 199 | "title": "Storage", 200 | "aliasYAxis": {} 201 | }, 202 | { 203 | "span": 6, 204 | "editable": true, 205 | "type": "graphite", 206 | "loadingEditor": false, 207 | "datasource": null, 208 | "renderer": "flot", 209 | "x-axis": true, 210 | "y-axis": true, 211 | "scale": 1, 212 | "y_formats": [ 213 | "bytes", 214 | "short" 215 | ], 216 | "grid": { 217 | "max": null, 218 | "min": 0, 219 | "threshold1": null, 220 | "threshold2": null, 221 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 222 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 223 | }, 224 | "annotate": { 225 | "enable": false 226 | }, 227 | "resolution": 100, 228 | "lines": true, 229 | "fill": 0, 230 | "linewidth": 2, 231 | "points": false, 232 | "pointradius": 5, 233 | "bars": false, 234 | "stack": false, 235 | "legend": { 236 | "show": true, 237 | "values": true, 238 | "min": false, 239 | "max": false, 240 | "current": true, 241 | "total": false, 242 | "avg": false 243 | }, 244 | "percentage": false, 245 | "zerofill": true, 246 | "nullPointMode": "connected", 247 | "steppedLine": false, 248 | "tooltip": { 249 | "value_type": "cumulative", 250 | "query_as_alias": true 251 | }, 252 | "targets": [ 253 | { 254 | "target": "alias(removeAbovePercentile(sumSeries(collectd.*.[[cluster]].[[pool]].gauge.read_bytes_sec),99),'Read')" 255 | }, 256 | { 257 | "target": "alias(removeAbovePercentile(sumSeries(collectd.*.[[cluster]].[[pool]].gauge.write_bytes_sec),99),'Write')" 258 | } 259 | ], 260 | "aliasColors": {}, 261 | "aliasYAxis": {}, 262 | "title": "Throughput" 263 | } 264 | ], 265 | "notice": false 266 | }, 267 | { 268 | "title": "", 269 | "height": "250px", 270 | "editable": true, 271 | "collapse": false, 272 | "collapsable": true, 273 | "panels": [ 274 | { 275 | "span": 6, 276 | "editable": true, 277 | "type": "graphite", 278 | "loadingEditor": false, 279 | "datasource": null, 280 | "renderer": "flot", 281 | "x-axis": true, 282 | "y-axis": true, 283 | "scale": 1, 284 | "y_formats": [ 285 | "none", 286 | "short" 287 | ], 288 | "grid": { 289 | "max": null, 290 | "min": 0, 291 | "threshold1": null, 292 | "threshold2": null, 293 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 294 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 295 | }, 296 | "annotate": { 297 | "enable": false 298 | }, 299 | "resolution": 100, 300 | "lines": true, 301 | "fill": 0, 302 | "linewidth": 2, 303 | "points": false, 304 | "pointradius": 5, 305 | "bars": false, 306 | "stack": false, 307 | "legend": { 308 | "show": true, 309 | "values": true, 310 | "min": false, 311 | "max": false, 312 | "current": true, 313 | "total": false, 314 | "avg": false 315 | }, 316 | "percentage": false, 317 | "zerofill": true, 318 | "nullPointMode": "connected", 319 | "steppedLine": false, 320 | "tooltip": { 321 | "value_type": "cumulative", 322 | "query_as_alias": true 323 | }, 324 | "targets": [ 325 | { 326 | "target": "alias(removeAbovePercentile(sumSeries(collectd.*.[[cluster]].[[pool]].gauge.op_per_sec),99),'IOPS')" 327 | } 328 | ], 329 | "aliasColors": {}, 330 | "aliasYAxis": {}, 331 | "title": "IOPS" 332 | }, 333 | { 334 | "span": 6, 335 | "editable": true, 336 | "type": "graphite", 337 | "loadingEditor": false, 338 | "datasource": null, 339 | "renderer": "flot", 340 | "x-axis": true, 341 | "y-axis": true, 342 | "scale": 1, 343 | "y_formats": [ 344 | "ms", 345 | "short" 346 | ], 347 | "grid": { 348 | "max": null, 349 | "min": 0, 350 | "threshold1": null, 351 | "threshold2": null, 352 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 353 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 354 | }, 355 | "annotate": { 356 | "enable": false 357 | }, 358 | "resolution": 100, 359 | "lines": true, 360 | "fill": 0, 361 | "linewidth": 2, 362 | "points": false, 363 | "pointradius": 5, 364 | "bars": false, 365 | "stack": false, 366 | "legend": { 367 | "show": true, 368 | "values": true, 369 | "min": false, 370 | "max": false, 371 | "current": true, 372 | "total": false, 373 | "avg": false 374 | }, 375 | "percentage": false, 376 | "zerofill": true, 377 | "nullPointMode": "connected", 378 | "steppedLine": false, 379 | "tooltip": { 380 | "value_type": "cumulative", 381 | "query_as_alias": true 382 | }, 383 | "targets": [ 384 | { 385 | "target": "alias(collectd.*.[[cluster]].cluster.gauge.avg_latency,'Avg')" 386 | }, 387 | { 388 | "target": "alias(collectd.*.[[cluster]].cluster.gauge.max_latency,'Max')" 389 | }, 390 | { 391 | "target": "alias(collectd.*.[[cluster]].cluster.gauge.min_latency,'Min')" 392 | }, 393 | { 394 | "target": "alias(collectd.*.[[cluster]].cluster.gauge.stddev_latency,'Stddev')" 395 | } 396 | ], 397 | "aliasColors": {}, 398 | "aliasYAxis": {}, 399 | "title": "Cluster I/O Latency" 400 | } 401 | ], 402 | "notice": false 403 | }, 404 | { 405 | "title": "", 406 | "height": "250px", 407 | "editable": true, 408 | "collapse": false, 409 | "collapsable": true, 410 | "panels": [ 411 | { 412 | "span": 4, 413 | "editable": true, 414 | "type": "graphite", 415 | "loadingEditor": false, 416 | "datasource": null, 417 | "renderer": "flot", 418 | "x-axis": true, 419 | "y-axis": true, 420 | "scale": 1, 421 | "y_formats": [ 422 | "none", 423 | "short" 424 | ], 425 | "grid": { 426 | "max": null, 427 | "min": 0, 428 | "threshold1": null, 429 | "threshold2": null, 430 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 431 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 432 | }, 433 | "annotate": { 434 | "enable": false 435 | }, 436 | "resolution": 100, 437 | "lines": true, 438 | "fill": 0, 439 | "linewidth": 2, 440 | "points": false, 441 | "pointradius": 5, 442 | "bars": false, 443 | "stack": false, 444 | "legend": { 445 | "show": true, 446 | "values": true, 447 | "min": false, 448 | "max": false, 449 | "current": true, 450 | "total": false, 451 | "avg": false 452 | }, 453 | "percentage": false, 454 | "zerofill": true, 455 | "nullPointMode": "connected", 456 | "steppedLine": false, 457 | "tooltip": { 458 | "value_type": "cumulative", 459 | "query_as_alias": true 460 | }, 461 | "targets": [ 462 | { 463 | "target": "alias(collectd.*.[[cluster]].mon.gauge.number,'Total')" 464 | }, 465 | { 466 | "target": "alias(collectd.*.[[cluster]].mon.gauge.quorum,'Quorum')" 467 | } 468 | ], 469 | "aliasColors": {}, 470 | "aliasYAxis": {}, 471 | "title": "Monitors" 472 | }, 473 | { 474 | "span": 4, 475 | "editable": true, 476 | "type": "graphite", 477 | "loadingEditor": false, 478 | "datasource": null, 479 | "renderer": "flot", 480 | "x-axis": true, 481 | "y-axis": true, 482 | "scale": 1, 483 | "y_formats": [ 484 | "none", 485 | "short" 486 | ], 487 | "grid": { 488 | "max": null, 489 | "min": 0, 490 | "threshold1": null, 491 | "threshold2": null, 492 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 493 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 494 | }, 495 | "annotate": { 496 | "enable": false 497 | }, 498 | "resolution": 100, 499 | "lines": true, 500 | "fill": 0, 501 | "linewidth": 2, 502 | "points": false, 503 | "pointradius": 5, 504 | "bars": false, 505 | "stack": false, 506 | "legend": { 507 | "show": true, 508 | "values": true, 509 | "min": false, 510 | "max": false, 511 | "current": true, 512 | "total": false, 513 | "avg": false 514 | }, 515 | "percentage": false, 516 | "zerofill": true, 517 | "nullPointMode": "connected", 518 | "steppedLine": false, 519 | "tooltip": { 520 | "value_type": "cumulative", 521 | "query_as_alias": true 522 | }, 523 | "targets": [ 524 | { 525 | "target": "alias(collectd.*.[[cluster]].osd.gauge.up,'Up')" 526 | }, 527 | { 528 | "target": "alias(collectd.*.[[cluster]].osd.gauge.down,'Down')" 529 | }, 530 | { 531 | "target": "alias(collectd.*.[[cluster]].osd.gauge.in,'In')" 532 | }, 533 | { 534 | "target": "alias(collectd.*.[[cluster]].osd.gauge.out,'Out')" 535 | } 536 | ], 537 | "aliasColors": {}, 538 | "aliasYAxis": {}, 539 | "title": "OSDs", 540 | "leftYAxisLabel": "", 541 | "rightYAxisLabel": "" 542 | }, 543 | { 544 | "span": 4, 545 | "editable": true, 546 | "type": "graphite", 547 | "loadingEditor": false, 548 | "datasource": null, 549 | "renderer": "flot", 550 | "x-axis": true, 551 | "y-axis": true, 552 | "scale": 1, 553 | "y_formats": [ 554 | "none", 555 | "short" 556 | ], 557 | "grid": { 558 | "max": null, 559 | "min": 0, 560 | "threshold1": null, 561 | "threshold2": null, 562 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 563 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 564 | }, 565 | "annotate": { 566 | "enable": false 567 | }, 568 | "resolution": 100, 569 | "lines": true, 570 | "fill": 0, 571 | "linewidth": 2, 572 | "points": false, 573 | "pointradius": 5, 574 | "bars": false, 575 | "stack": false, 576 | "legend": { 577 | "show": true, 578 | "values": true, 579 | "min": false, 580 | "max": false, 581 | "current": true, 582 | "total": false, 583 | "avg": false 584 | }, 585 | "percentage": false, 586 | "zerofill": true, 587 | "nullPointMode": "connected", 588 | "steppedLine": false, 589 | "tooltip": { 590 | "value_type": "cumulative", 591 | "query_as_alias": true 592 | }, 593 | "targets": [ 594 | { 595 | "target": "alias(collectd.*.[[cluster]].pg.gauge.creating,'Creating')" 596 | }, 597 | { 598 | "target": "alias(collectd.*.[[cluster]].pg.gauge.clean,'Clean')" 599 | }, 600 | { 601 | "target": "alias(collectd.*.[[cluster]].pg.gauge.active,'Active')" 602 | }, 603 | { 604 | "target": "alias(collectd.*.[[cluster]].pg.gauge.down,'Down')" 605 | }, 606 | { 607 | "target": "alias(collectd.*.[[cluster]].pg.gauge.replay,'Replay')" 608 | }, 609 | { 610 | "target": "alias(collectd.*.[[cluster]].pg.gauge.splitting,'Splitting')" 611 | }, 612 | { 613 | "target": "alias(collectd.*.[[cluster]].pg.gauge.scrubbing,'Scrubbing')" 614 | }, 615 | { 616 | "target": "alias(collectd.*.[[cluster]].pg.gauge.degraded,'Degraded')" 617 | }, 618 | { 619 | "target": "alias(collectd.*.[[cluster]].pg.gauge.inconsistent,'Inconsistent')" 620 | }, 621 | { 622 | "target": "alias(collectd.*.[[cluster]].pg.gauge.peering,'Peering')" 623 | }, 624 | { 625 | "target": "alias(collectd.*.[[cluster]].pg.gauge.repair,'Repair')" 626 | }, 627 | { 628 | "target": "alias(collectd.*.[[cluster]].pg.gauge.recovering,'Recovering')" 629 | }, 630 | { 631 | "target": "alias(collectd.*.[[cluster]].pg.gauge.backfill,'Backfill')" 632 | }, 633 | { 634 | "target": "alias(collectd.*.[[cluster]].pg.gauge.wait-backfill,'Wait Backfill')" 635 | }, 636 | { 637 | "target": "alias(collectd.*.[[cluster]].pg.gauge.backfill-toofull,'Backfill Toofull')" 638 | }, 639 | { 640 | "target": "alias(collectd.*.[[cluster]].pg.gauge.incomplete,'Incomplete')" 641 | }, 642 | { 643 | "target": "alias(collectd.*.[[cluster]].pg.gauge.stale,'Stale')" 644 | }, 645 | { 646 | "target": "alias(collectd.*.[[cluster]].pg.gauge.remapped,'Remapped')" 647 | } 648 | ], 649 | "aliasColors": {}, 650 | "aliasYAxis": {}, 651 | "title": "Placement Groups" 652 | } 653 | ], 654 | "notice": false 655 | }, 656 | { 657 | "title": "", 658 | "height": "250px", 659 | "editable": true, 660 | "collapse": false, 661 | "collapsable": true, 662 | "panels": [ 663 | { 664 | "span": 6, 665 | "editable": true, 666 | "type": "graphite", 667 | "loadingEditor": false, 668 | "datasource": null, 669 | "renderer": "flot", 670 | "x-axis": true, 671 | "y-axis": true, 672 | "scale": 1, 673 | "y_formats": [ 674 | "ms", 675 | "short" 676 | ], 677 | "grid": { 678 | "max": null, 679 | "min": 0, 680 | "threshold1": null, 681 | "threshold2": null, 682 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 683 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 684 | }, 685 | "annotate": { 686 | "enable": false 687 | }, 688 | "resolution": 100, 689 | "lines": true, 690 | "fill": 0, 691 | "linewidth": 1, 692 | "points": false, 693 | "pointradius": 5, 694 | "bars": false, 695 | "stack": false, 696 | "legend": { 697 | "show": true, 698 | "values": false, 699 | "min": false, 700 | "max": false, 701 | "current": false, 702 | "total": false, 703 | "avg": false 704 | }, 705 | "percentage": false, 706 | "zerofill": true, 707 | "nullPointMode": "connected", 708 | "steppedLine": false, 709 | "tooltip": { 710 | "value_type": "cumulative", 711 | "query_as_alias": true 712 | }, 713 | "targets": [ 714 | { 715 | "target": "aliasByNode(collectd.*.[[cluster]].osd-*.gauge.apply_latency_ms,3)" 716 | } 717 | ], 718 | "aliasColors": {}, 719 | "aliasYAxis": {}, 720 | "title": "OSD Apply Latency" 721 | }, 722 | { 723 | "span": 6, 724 | "editable": true, 725 | "type": "graphite", 726 | "loadingEditor": false, 727 | "datasource": null, 728 | "renderer": "flot", 729 | "x-axis": true, 730 | "y-axis": true, 731 | "scale": 1, 732 | "y_formats": [ 733 | "ms", 734 | "short" 735 | ], 736 | "grid": { 737 | "max": null, 738 | "min": 0, 739 | "threshold1": null, 740 | "threshold2": null, 741 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 742 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 743 | }, 744 | "annotate": { 745 | "enable": false 746 | }, 747 | "resolution": 100, 748 | "lines": true, 749 | "fill": 0, 750 | "linewidth": 1, 751 | "points": false, 752 | "pointradius": 5, 753 | "bars": false, 754 | "stack": false, 755 | "legend": { 756 | "show": true, 757 | "values": false, 758 | "min": false, 759 | "max": false, 760 | "current": false, 761 | "total": false, 762 | "avg": false 763 | }, 764 | "percentage": false, 765 | "zerofill": true, 766 | "nullPointMode": "connected", 767 | "steppedLine": false, 768 | "tooltip": { 769 | "value_type": "cumulative", 770 | "query_as_alias": true 771 | }, 772 | "targets": [ 773 | { 774 | "target": "aliasByNode(collectd.*.[[cluster]].osd-*.gauge.commit_latency_ms,3)" 775 | } 776 | ], 777 | "aliasColors": {}, 778 | "aliasYAxis": {}, 779 | "title": "OSD Commit Latency" 780 | } 781 | ], 782 | "notice": false 783 | }, 784 | { 785 | "title": "", 786 | "height": "250px", 787 | "editable": true, 788 | "collapse": false, 789 | "collapsable": true, 790 | "panels": [ 791 | { 792 | "span": 6, 793 | "editable": true, 794 | "type": "graphite", 795 | "loadingEditor": false, 796 | "datasource": null, 797 | "renderer": "flot", 798 | "x-axis": true, 799 | "y-axis": true, 800 | "scale": 1, 801 | "y_formats": [ 802 | "bytes", 803 | "short" 804 | ], 805 | "grid": { 806 | "max": null, 807 | "min": 0, 808 | "threshold1": null, 809 | "threshold2": null, 810 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 811 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 812 | }, 813 | "annotate": { 814 | "enable": false 815 | }, 816 | "resolution": 100, 817 | "lines": true, 818 | "fill": 0, 819 | "linewidth": 1, 820 | "points": false, 821 | "pointradius": 5, 822 | "bars": false, 823 | "stack": false, 824 | "legend": { 825 | "show": true, 826 | "values": false, 827 | "min": false, 828 | "max": false, 829 | "current": false, 830 | "total": false, 831 | "avg": false 832 | }, 833 | "percentage": false, 834 | "zerofill": true, 835 | "nullPointMode": "connected", 836 | "steppedLine": false, 837 | "tooltip": { 838 | "value_type": "cumulative", 839 | "query_as_alias": true 840 | }, 841 | "targets": [ 842 | { 843 | "target": "aliasByNode(scale(collectd.*.[[cluster]].osd-*.gauge.kb_used,1000),3)" 844 | } 845 | ], 846 | "aliasColors": {}, 847 | "aliasYAxis": {}, 848 | "title": "OSD Usage" 849 | }, 850 | { 851 | "span": 6, 852 | "editable": true, 853 | "type": "graphite", 854 | "loadingEditor": false, 855 | "datasource": null, 856 | "renderer": "flot", 857 | "x-axis": true, 858 | "y-axis": true, 859 | "scale": 1, 860 | "y_formats": [ 861 | "none", 862 | "short" 863 | ], 864 | "grid": { 865 | "max": null, 866 | "min": 0, 867 | "threshold1": null, 868 | "threshold2": null, 869 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 870 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 871 | }, 872 | "annotate": { 873 | "enable": false 874 | }, 875 | "resolution": 100, 876 | "lines": true, 877 | "fill": 0, 878 | "linewidth": 1, 879 | "points": false, 880 | "pointradius": 5, 881 | "bars": false, 882 | "stack": false, 883 | "legend": { 884 | "show": true, 885 | "values": false, 886 | "min": false, 887 | "max": false, 888 | "current": false, 889 | "total": false, 890 | "avg": false 891 | }, 892 | "percentage": false, 893 | "zerofill": true, 894 | "nullPointMode": "connected", 895 | "steppedLine": false, 896 | "tooltip": { 897 | "value_type": "cumulative", 898 | "query_as_alias": true 899 | }, 900 | "targets": [ 901 | { 902 | "target": "aliasByNode(collectd.*.[[cluster]].osd-*.gauge.num_snap_trimming,3)" 903 | } 904 | ], 905 | "aliasColors": {}, 906 | "aliasYAxis": {}, 907 | "title": "OSD Snap Trimming" 908 | } 909 | ], 910 | "notice": false 911 | } 912 | ], 913 | "editable": true, 914 | "failover": false, 915 | "panel_hints": true, 916 | "style": "dark", 917 | "pulldowns": [ 918 | { 919 | "type": "filtering", 920 | "collapse": false, 921 | "notice": false, 922 | "enable": true 923 | }, 924 | { 925 | "type": "annotations", 926 | "enable": false 927 | } 928 | ], 929 | "nav": [ 930 | { 931 | "type": "timepicker", 932 | "collapse": false, 933 | "notice": false, 934 | "enable": true, 935 | "status": "Stable", 936 | "time_options": [ 937 | "5m", 938 | "15m", 939 | "1h", 940 | "6h", 941 | "12h", 942 | "24h", 943 | "2d", 944 | "7d", 945 | "30d" 946 | ], 947 | "refresh_intervals": [ 948 | "5s", 949 | "10s", 950 | "30s", 951 | "1m", 952 | "5m", 953 | "15m", 954 | "30m", 955 | "1h", 956 | "2h", 957 | "1d" 958 | ], 959 | "now": true 960 | } 961 | ], 962 | "loader": { 963 | "save_gist": false, 964 | "save_elasticsearch": true, 965 | "save_local": true, 966 | "save_default": true, 967 | "save_temp": true, 968 | "save_temp_ttl_enable": true, 969 | "save_temp_ttl": "30d", 970 | "load_gist": false, 971 | "load_elasticsearch": true, 972 | "load_elasticsearch_size": 20, 973 | "load_local": false, 974 | "hide": false 975 | }, 976 | "refresh": false, 977 | "tags": [], 978 | "timezone": "browser" 979 | } 980 | --------------------------------------------------------------------------------