diff options
author | Sahina Bose <sabose@redhat.com> | 2015-03-02 14:45:20 +0530 |
---|---|---|
committer | Sahina Bose <sabose@redhat.com> | 2015-03-25 05:36:50 -0700 |
commit | 37e8b7b4c96e974968f74112bd7512d6f8856b7c (patch) | |
tree | 3814dd39c07bbe7baca28a208d5fca606cdccdaa /plugins | |
parent | 8923fa5fed1847b98dc2c1d389314908af8f3b4b (diff) |
nagios-plugins: Enhanced nagios self-heal plugin
Enhanced nagios self-heal plugin to report
split-brain entries if found. Earlier this output
was not reliable and hence was not used. With
glusterfs 3.7, this issue has been fixed
Change-Id: Icb79516383245839d45f4c9570c08993844fc5bd
Bug-Url: https://bugzilla.redhat.com/1081900
Signed-off-by: Sahina Bose <sabose@redhat.com>
Reviewed-on: http://review.gluster.org/9783
Reviewed-by: Ramesh N <rnachimu@redhat.com>
Diffstat (limited to 'plugins')
-rwxr-xr-x | plugins/check_volume_status.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/check_volume_status.py b/plugins/check_volume_status.py index 8c02090..8fab7ae 100755 --- a/plugins/check_volume_status.py +++ b/plugins/check_volume_status.py @@ -83,7 +83,7 @@ def getVolumeQuotaStatus(args): return utils.PluginStatusCode.OK, "QUOTA: OK" -def getVolumeSelfHealStatus(args): +def getVolumeSelfHealSplitBrainStatus(args): try: volume = glustercli.volumeHealSplitBrainStatus(args.volume) except glustercli.GlusterLockedException as e: @@ -96,7 +96,7 @@ def getVolumeSelfHealStatus(args): if volume.get(args.volume) is None: exitstatus = utils.PluginStatusCode.UNKNOWN - message = "UNKNOWN: Volume self heal info not found" + message = "UNKNOWN: Volume self heal split-brain info not found" else: if (volume[args.volume]['status'] == glustercli. VolumeSplitBrainStatus.NOTAPPLICABLE): @@ -105,11 +105,11 @@ def getVolumeSelfHealStatus(args): elif (volume[args.volume]['status'] == glustercli. VolumeSplitBrainStatus.OK): exitstatus = utils.PluginStatusCode.OK - message = "No unsynced entries present" + message = "No split brain state entries found." elif (volume[args.volume]['status'] == glustercli. VolumeSplitBrainStatus.SPLITBRAIN): - exitstatus = utils.PluginStatusCode.WARNING - message = ("Unsynced entries present %s" + exitstatus = utils.PluginStatusCode.CRITICAL + message = ("%s entries in split-brain state found." % (volume[args.volume]['unsyncedentries'])) return exitstatus, message @@ -173,7 +173,7 @@ if __name__ == '__main__': if args.type == "quota": exitstatus, message = getVolumeQuotaStatus(args) if args.type == "self-heal": - exitstatus, message = getVolumeSelfHealStatus(args) + exitstatus, message = getVolumeSelfHealSplitBrainStatus(args) if args.type == "geo-rep": exitstatus, message = getVolumeGeoRepStatus(args) print message |