diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-02-21 19:34:08 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-02-21 19:34:08 +0000 |
commit | 6d2e027eb728c8294fdd7c3692e9853b3ca2603b (patch) | |
tree | 3e190253238075ac8590b2f214852d2256fdad53 /collectors/python.d.plugin/ceph | |
parent | Opting out by default from sending anonymous statistics (phone home). (diff) | |
download | netdata-6d2e027eb728c8294fdd7c3692e9853b3ca2603b.tar.xz netdata-6d2e027eb728c8294fdd7c3692e9853b3ca2603b.zip |
Merging upstream version 1.12.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'collectors/python.d.plugin/ceph')
-rw-r--r-- | collectors/python.d.plugin/ceph/ceph.chart.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/collectors/python.d.plugin/ceph/ceph.chart.py b/collectors/python.d.plugin/ceph/ceph.chart.py index 45b52620f..fe9b2b9ab 100644 --- a/collectors/python.d.plugin/ceph/ceph.chart.py +++ b/collectors/python.d.plugin/ceph/ceph.chart.py @@ -161,7 +161,7 @@ class Service(SimpleService): :return: None """ # Pool lines - for pool in sorted(self._get_df()['pools']): + for pool in sorted(self._get_df()['pools'], key=lambda x:sorted(x.keys())): self.definitions['pool_usage']['lines'].append([pool['name'], pool['name'], 'absolute']) @@ -182,7 +182,7 @@ class Service(SimpleService): 'absolute']) # OSD lines - for osd in sorted(self._get_osd_df()['nodes']): + for osd in sorted(self._get_osd_df()['nodes'], key=lambda x:sorted(x.keys())): self.definitions['osd_usage']['lines'].append([osd['name'], osd['name'], 'absolute']) @@ -309,7 +309,7 @@ class Service(SimpleService): return json.loads(self.cluster.mon_command(json.dumps({ 'prefix': 'df', 'format': 'json' - }), '')[1]) + }), '')[1].decode('utf-8')) def _get_osd_df(self): """ @@ -319,7 +319,7 @@ class Service(SimpleService): return json.loads(self.cluster.mon_command(json.dumps({ 'prefix': 'osd df', 'format': 'json' - }), '')[1].replace('-nan', '"-nan"')) + }), '')[1].decode('utf-8').replace('-nan', '"-nan"')) def _get_osd_perf(self): """ @@ -329,7 +329,7 @@ class Service(SimpleService): return json.loads(self.cluster.mon_command(json.dumps({ 'prefix': 'osd perf', 'format': 'json' - }), '')[1]) + }), '')[1].decode('utf-8')) def _get_osd_pool_stats(self): """ @@ -341,4 +341,4 @@ class Service(SimpleService): return json.loads(self.cluster.mon_command(json.dumps({ 'prefix': 'osd pool stats', 'format': 'json' - }), '')[1]) + }), '')[1].decode('utf-8')) |