diff options
author | Ramesh Nachimuthu <rnachimu@redhat.com> | 2014-05-05 14:51:04 +0530 |
---|---|---|
committer | Sahina Bose <sabose@redhat.com> | 2014-05-12 03:49:50 -0700 |
commit | a599073b9a35eb880de17f70e501e540ae9c6bde (patch) | |
tree | b8fdaa029ba94bb9f6d3ad06ad813a75392760bd /plugins | |
parent | 9d252a32334a185a717da8990bd6b5e07da97771 (diff) |
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 <rnachimu@redhat.com>
Reviewed-on: http://review.gluster.org/7679
Reviewed-by: Sahina Bose <sabose@redhat.com>
Tested-by: Sahina Bose <sabose@redhat.com>
Diffstat (limited to 'plugins')
-rwxr-xr-x | plugins/discoverpeers.py | 11 |
1 files changed, 5 insertions, 6 deletions
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) |