summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xplugins/check_volume_status.py6
-rwxr-xr-xplugins/discover_volumes.py4
2 files changed, 7 insertions, 3 deletions
diff --git a/plugins/check_volume_status.py b/plugins/check_volume_status.py
index 4812e99..77168f3 100755
--- a/plugins/check_volume_status.py
+++ b/plugins/check_volume_status.py
@@ -34,11 +34,13 @@ def getVolumeStatus(args):
elif volumes[args.volume]["volumeStatus"] == (glustercli.
VolumeStatus.ONLINE):
exitstatus = utils.PluginStatusCode.OK
- message = "OK: Volume is up"
+ message = "OK: Volume : %s type - Volume is up" % \
+ (volumes[args.volume]["volumeType"])
elif volumes[args.volume]["volumeStatus"] == (glustercli.
VolumeStatus.OFFLINE):
exitstatus = utils.PluginStatusCode.CRITICAL
- message = "CRITICAL: Volume is stopped"
+ message = "CRITICAL: Volume : %s type is stopped" % \
+ (volumes[args.volume]["volumeType"])
except glustercli.GlusterCmdFailedException as e:
out = ("UNKNOWN: Command execution failed %s" % e.message)
return utils.PluginStatusCode.UNKNOWN, out
diff --git a/plugins/discover_volumes.py b/plugins/discover_volumes.py
index ba48532..5d1d463 100755
--- a/plugins/discover_volumes.py
+++ b/plugins/discover_volumes.py
@@ -65,10 +65,12 @@ def discoverVolumes(volumeName, list):
if geoRepStatus == "on":
volDict['geo-rep'] = geoRepStatus
+ volDict['replicaCount'] = volume['replicaCount']
volDict['bricks'] = []
for brick in volume['bricksInfo']:
brickproplist = brick['name'].split(':')
- volDict['bricks'].append({'brickpath': brickproplist[1],
+ volDict['bricks'].append({'brickaddress': brickproplist[0],
+ 'brickpath': brickproplist[1],
'hostUuid': brick['hostUuid']})
resultlist[key] = volDict
resultString = json.dumps(resultlist)