summaryrefslogtreecommitdiffstats
path: root/plugins/check_vol_server.py
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_vol_server.py')
-rwxr-xr-xplugins/check_vol_server.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/plugins/check_vol_server.py b/plugins/check_vol_server.py
index 0e108d0..2301e61 100755
--- a/plugins/check_vol_server.py
+++ b/plugins/check_vol_server.py
@@ -58,6 +58,10 @@ def _getVolSelfHealStatusNRPECommand(volume):
return ("check_vol_status -a %s %s" % (volume, 'self-heal'))
+def _getVolSelfHealInfoNRPECommand(volume):
+ return ("check_vol_status -a %s %s" % (volume, 'heal-info'))
+
+
def _getVolGeoRepStatusNRPECommand(volume):
return ("check_vol_status -a %s %s" % (volume, 'geo-rep'))
@@ -223,10 +227,10 @@ def _getVolumeQuotaStatusOutput(hostgroup, volume):
def _getQuorumStatusOutput(hostgroup):
# get current volume quorum status
table = json.loads(livestatus.readLiveStatusAsJSON("GET services\n"
- "Columns: state plugin_output\n"
- "Filter: description = "
- "Cluster - Quorum Status\n"
- "Filter: host_name = %s\n" % hostgroup))
+ "Columns: state plugin_output\n"
+ "Filter: description = "
+ "Cluster - Quorum Status\n"
+ "Filter: host_name = %s\n" % hostgroup))
servicestatus = utils.PluginStatusCode.UNKNOWN
pluginoutput = ''
for row in table:
@@ -294,6 +298,8 @@ def showVolumeOutput(args):
command = _getVolSelfHealStatusNRPECommand(args.volume)
elif args.option == 'geo-rep':
command = _getVolGeoRepStatusNRPECommand(args.volume)
+ elif args.option == 'heal-info':
+ command = _getVolSelfHealInfoNRPECommand(args.volume)
elif args.option == 'quorum':
return _getQuorumStatusOutput(args.hostgroup)
@@ -331,6 +337,7 @@ def parse_input():
'status',
'quota',
'self-heal',
+ 'heal-info',
'geo-rep',
'quorum'])
parser.add_argument('-t', '--timeout',