From 10c414706c2c77225c014673f03b8e3166b82ff2 Mon Sep 17 00:00:00 2001 From: ndarshan Date: Thu, 10 Apr 2014 11:15:53 +0530 Subject: Server-addons: Server-side plugin for volume status. Modified the existing volume utilization server plugin to include status information as well. Refactored the plugin with an argument -o|--option to get the specific volume status. Change-Id: I2b6f8612e32390fb20917098a255de1ee6b3a170 Signed-off-by: ndarshan Signed-off-by: Sahina Bose --- config/gluster-commands.cfg | 6 +++++- config/glustercluster.cfg.sample | 16 ++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/gluster-commands.cfg b/config/gluster-commands.cfg index 377887c..ec72417 100644 --- a/config/gluster-commands.cfg +++ b/config/gluster-commands.cfg @@ -52,7 +52,7 @@ define command { define command { command_name check_vol_utilization - command_line $USER1$/gluster/check_vol_utilization_server.py $ARG1$ $ARG2$ -w $ARG3$ -c $ARG4$ + command_line $USER1$/gluster/check_vol_server.py $ARG1$ $ARG2$ -w $ARG3$ -c $ARG4$ -o utilization } @@ -71,3 +71,7 @@ define command{ command_line $USER1$/check_dummy 0 } +define command { + command_name check_vol_status + command_line $USER1$/gluster/check_vol_server.py $ARG1$ $ARG2$ -o status +} diff --git a/config/glustercluster.cfg.sample b/config/glustercluster.cfg.sample index 81124d7..3afb95a 100644 --- a/config/glustercluster.cfg.sample +++ b/config/glustercluster.cfg.sample @@ -91,6 +91,22 @@ define service{ check_command check_vol_utilization!test-cluster!data-vol!70!90 } +################################################################################ +# This defines a Volume status service +# Edit this sample +# host_name = the cluster host previously defined for cluster +# service_description = Volume-status - +# check_command = check_vol_status!! +# _VOL_NAME = Volume name +################################################################################ +define service{ + use gluster-service-without-graph + host_name test-cluster + service_description Volume Status - data-vol + _VOL_NAME data-vol ; MUST DECLARE the custom var _VOL_NAME + check_command check_vol_status!test-cluster!data-vol +} + ################################################################################ # This defines a Cluster utilization service # Edit this sample -- cgit