Correct failure to get ceph_health data
This commit is contained in:
parent
c0c9327a7d
commit
2b5dc286ab
|
@ -1322,10 +1322,13 @@ def collect_ceph_stats(queue):
|
||||||
ceph_health = json.loads(stdout)['status']
|
ceph_health = json.loads(stdout)['status']
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.out('Failed to obtain Ceph health data: {}'.format(e), state='e')
|
logger.out('Failed to obtain Ceph health data: {}'.format(e), state='e')
|
||||||
|
ceph_health = 'HEALTH_UNKN'
|
||||||
|
|
||||||
if ceph_health == 'HEALTH_OK':
|
if ceph_health in ['HEALTH_OK']:
|
||||||
ceph_health_colour = fmt_green
|
ceph_health_colour = fmt_green
|
||||||
elif ceph_health == 'HEALTH_WARN':
|
elif ceph_health in ['HEALTH_UNKN']:
|
||||||
|
ceph_health_colour = fmt_cyan
|
||||||
|
elif ceph_health in ['HEALTH_WARN']:
|
||||||
ceph_health_colour = fmt_yellow
|
ceph_health_colour = fmt_yellow
|
||||||
else:
|
else:
|
||||||
ceph_health_colour = fmt_red
|
ceph_health_colour = fmt_red
|
||||||
|
|
Loading…
Reference in New Issue