summaryrefslogtreecommitdiffstats
path: root/plugins/check_volume_status.py
diff options
context:
space:
mode:
authorNishanth Thomas <nthomas@redhat.com>2014-05-26 20:01:44 +0530
committerSahina Bose <sabose@redhat.com>2014-06-04 03:36:48 -0700
commit58138dcd260104a24e9f1e6c417f0cff8dafb990 (patch)
tree7d7862a7ba0787f40b4f228cd39fb5c5094784a9 /plugins/check_volume_status.py
parentda2722d315a0866c52f425f176d3a1aa2b651a0e (diff)
gluster-nagios-addons:volume status based on volume type
Added the volume type in the plugin output The logic of determining the volume status changed based on the volume type. Added the volume type and the list of bricks down in the plugin output Change-Id: Ib999fc78059c725a29f4f7bc3b3328c34b6a6b33 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1096159 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1096169 Signed-off-by: Nishanth Thomas <nthomas@redhat.com> Reviewed-on: http://review.gluster.org/7878 Reviewed-by: Sahina Bose <sabose@redhat.com> Tested-by: Sahina Bose <sabose@redhat.com>
Diffstat (limited to 'plugins/check_volume_status.py')
-rwxr-xr-xplugins/check_volume_status.py6
1 files changed, 4 insertions, 2 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