fix #14841 Exception funktion call Rados.mon_command() (#14844)
farax4de committed
Mar 31, 2023 at 19:51 UTC
a5e23e73cadcd4ef603c241d5f8b3f09c373cd51
1 file changed
+4
-4
collectors/python.d.plugin/ceph/ceph.chart.py
+4
-4
@@ -331,7 +331,7 @@ class Service(SimpleService):
331
return json.loads(self.cluster.mon_command(json.dumps({
332
'prefix': 'df',
333
'format': 'json'
334
- }), '')[1].decode('utf-8'))
334
+ }), b'')[1].decode('utf-8'))
335
336
def _get_osd_df(self):
337
"""
@@ -341,7 +341,7 @@ class Service(SimpleService):
341
return json.loads(self.cluster.mon_command(json.dumps({
342
'prefix': 'osd df',
343
'format': 'json'
344
- }), '')[1].decode('utf-8').replace('-nan', '"-nan"'))
344
+ }), b'')[1].decode('utf-8').replace('-nan', '"-nan"'))
345
346
def _get_osd_perf(self):
347
"""
@@ -351,7 +351,7 @@ class Service(SimpleService):
351
return json.loads(self.cluster.mon_command(json.dumps({
352
'prefix': 'osd perf',
353
'format': 'json'
354
- }), '')[1].decode('utf-8'))
354
+ }), b'')[1].decode('utf-8'))
355
356
def _get_osd_pool_stats(self):
357
"""
@@ -363,7 +363,7 @@ class Service(SimpleService):
363
return json.loads(self.cluster.mon_command(json.dumps({
364
'prefix': 'osd pool stats',
365
'format': 'json'
366
- }), '')[1].decode('utf-8'))
366
+ }), b'')[1].decode('utf-8'))
367
368
369
def get_osd_perf_infos(osd_perf):