From c7456a4ecfde42580f615042a35a6ed298c5171e Mon Sep 17 00:00:00 2001 From: Jan Fajerski Date: Fri, 27 Apr 2018 15:36:11 +0200 Subject: [PATCH] pybing/mgr/prometheus: return default port if config-key get returns empty Signed-off-by: Jan Fajerski --- src/pybind/mgr/prometheus/module.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pybind/mgr/prometheus/module.py b/src/pybind/mgr/prometheus/module.py index ce34defd4a1..576b8bf305e 100644 --- a/src/pybind/mgr/prometheus/module.py +++ b/src/pybind/mgr/prometheus/module.py @@ -593,6 +593,7 @@ class Module(MgrModule): r, outb, outs = result.wait() if r != 0: global_instance().log.error("Failed to retrieve port for mgr {}: {}".format(id_, outs)) + targets.append('{}:{}'.format(hostname, DEFAULT_PORT)) else: port = json.loads(outb) targets.append('{}:{}'.format(hostname, port))