def _get_overview(cluster): stats = {} for s in cluster['hostport'].split(','): host, port = map(str.strip, s.split(':')) zks = ZooKeeperStats(host, port) stats[s] = zks.get_stats() or {} cluster['stats'] = stats return cluster