summaryrefslogtreecommitdiffstats
path: root/plugins/check_vol_server.py
diff options
context:
space:
mode:
authorSahina Bose <sabose@redhat.com>2014-04-24 16:35:27 +0530
committerSahina Bose <sabose@redhat.com>2014-05-01 23:22:40 -0700
commitd5f6c2145bb37d7607d3f05329c0efca3c398fae (patch)
tree9aeb1736c3f5ce3681a328847ae4e4e8d6dad5af /plugins/check_vol_server.py
parentdd16d35b465974b17dfafd29006e8124f04c34e0 (diff)
plugins: Server side plugin for geo-rep
Added server side plugin option for geo-rep status Change-Id: I6f604862ec7d4813298a670b7ed2cc0b448faf23 Signed-off-by: Sahina Bose <sabose@redhat.com> Reviewed-on: http://review.gluster.org/7592
Diffstat (limited to 'plugins/check_vol_server.py')
-rwxr-xr-xplugins/check_vol_server.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/plugins/check_vol_server.py b/plugins/check_vol_server.py
index 4e99eb6..1cc043f 100755
--- a/plugins/check_vol_server.py
+++ b/plugins/check_vol_server.py
@@ -46,6 +46,10 @@ def _getVolSelfHealStatusNRPECommand(args):
return ("check_vol_status -a %s %s" % (args.volume, 'self-heal'))
+def _getVolGeoRepStatusNRPECommand(args):
+ return ("check_vol_status -a %s %s" % (args.volume, 'geo-rep'))
+
+
def _getNRPEBaseCmd(host):
return NRPE_PATH + " -H " + host + " -c "
@@ -140,6 +144,8 @@ def showVolumeOutput(args):
return _getVolumeQuotaStatusOutput(args)
elif args.option == 'self-heal':
command = _getVolSelfHealStatusNRPECommand(args)
+ elif args.option == 'geo-rep':
+ command = _getVolGeoRepStatusNRPECommand(args)
return _executeRandomHost(command)
@@ -174,7 +180,8 @@ def parse_input():
choices=['utilization',
'status',
'quota',
- 'self-heal'])
+ 'self-heal',
+ 'geo-rep'])
args = parser.parse_args()
if args.critical <= args.warning:
print "UNKNOWN:Critical must be greater than Warning."