From 8fef273702c273a183d1758b427830210d68c7dc Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 25 Jul 2017 22:57:12 -0400 Subject: [PATCH] pybind/mgr/zabbix: fix health in non-compat mode This was apparently written/tested with mon_health_preluminous_compat enabled. Fix to behave with or without that option. Fixes: http://tracker.ceph.com/issues/20767 Signed-off-by: Sage Weil --- src/pybind/mgr/zabbix/module.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pybind/mgr/zabbix/module.py b/src/pybind/mgr/zabbix/module.py index 9efb74c2ee0a..1313ede4cc71 100644 --- a/src/pybind/mgr/zabbix/module.py +++ b/src/pybind/mgr/zabbix/module.py @@ -113,7 +113,9 @@ class Module(MgrModule): data = dict() health = json.loads(self.get('health')['json']) - data['overall_status'] = health['overall_status'] + # 'status' is luminous+, 'overall_status' is legacy mode. + data['overall_status'] = health.get('status', + health.get('overall_status')) data['overall_status_int'] = \ self.ceph_health_mapping.get(data['overall_status']) -- 2.47.3