From a599073b9a35eb880de17f70e501e540ae9c6bde Mon Sep 17 00:00:00 2001 From: Ramesh Nachimuthu Date: Mon, 5 May 2014 14:51:04 +0530 Subject: autoconf: return all hosts in discoverpeers command Return all the hosts including disconnected hosts with the status field in discoverpeers NRPE command Bug-Url: https://bugzilla.redhat.com/1091170 Change-Id: If3f8076ba6857940bdd7c8eb7a5b2d0715985733 Signed-off-by: Ramesh Nachimuthu Reviewed-on: http://review.gluster.org/7679 Reviewed-by: Sahina Bose Tested-by: Sahina Bose --- plugins/discoverpeers.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'plugins') diff --git a/plugins/discoverpeers.py b/plugins/discoverpeers.py index 6683a84..59b1dad 100755 --- a/plugins/discoverpeers.py +++ b/plugins/discoverpeers.py @@ -21,18 +21,17 @@ import json from glusternagios import utils from glusternagios import glustercli -from glusternagios.glustercli import HostStatus def discoverhosts(): resultlist = [] peers = glustercli.peerStatus() for peer in peers: - if peer['status'] == HostStatus.CONNECTED: - peerDict = {} - peerDict['hostip'] = peer['hostname'] - peerDict['uuid'] = peer['uuid'] - resultlist.append(peerDict) + peerDict = {} + peerDict['hostip'] = peer['hostname'] + peerDict['uuid'] = peer['uuid'] + peerDict['status'] = peer['status'] + resultlist.append(peerDict) resultstring = json.dumps(resultlist) print resultstring sys.exit(utils.PluginStatusCode.OK) -- cgit