diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-02-21 19:34:01 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-02-21 19:34:01 +0000 |
commit | 66564c2324abc58b24327b763e1113ff781156a2 (patch) | |
tree | 2480212cd47149a3fda5225b57689d0126546e23 /collectors/python.d.plugin/ceph | |
parent | Adding upstream version 1.12.0. (diff) | |
download | netdata-66564c2324abc58b24327b763e1113ff781156a2.tar.xz netdata-66564c2324abc58b24327b763e1113ff781156a2.zip |
Adding upstream version 1.12.1.upstream/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 45b52620..fe9b2b9a 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')) |