From d5f6c2145bb37d7607d3f05329c0efca3c398fae Mon Sep 17 00:00:00 2001 From: Sahina Bose Date: Thu, 24 Apr 2014 16:35:27 +0530 Subject: plugins: Server side plugin for geo-rep Added server side plugin option for geo-rep status Change-Id: I6f604862ec7d4813298a670b7ed2cc0b448faf23 Signed-off-by: Sahina Bose Reviewed-on: http://review.gluster.org/7592 --- plugins/check_vol_server.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'plugins/check_vol_server.py') 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." -- cgit