From: Paul Cuzner Date: Wed, 23 Aug 2017 21:11:52 +0000 (+1200) Subject: rgw: add warning when >1 rgw admin socket is detected X-Git-Tag: v1.0~28^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7da432531e3c7f071e88b2294e4a529f2eddc198;p=cephmetrics.git rgw: add warning when >1 rgw admin socket is detected --- diff --git a/collectors/rgw.py b/collectors/rgw.py index 72bd9dd..dc9ae86 100644 --- a/collectors/rgw.py +++ b/collectors/rgw.py @@ -45,6 +45,11 @@ class RGW(BaseCollector): '{}.*.asok'.format(self.cluster_name, self.host_name)) if rgw_sockets: + + if len(rgw_sockets) > 1: + self.logger.warning("multiple rgw sockets found - " + "data sent from {}".format(rgw_sockets[0])) + response = self._admin_socket(socket_path=rgw_sockets[0]) if response: @@ -54,6 +59,7 @@ class RGW(BaseCollector): # admin_socket call failed return {} else: + # no socket found on the host, nothing to send to caller return {} @staticmethod