diff options
author | Sahina Bose <sabose@redhat.com> | 2014-05-08 12:46:51 +0530 |
---|---|---|
committer | Sahina Bose <sabose@redhat.com> | 2014-05-08 02:23:59 -0700 |
commit | 9d252a32334a185a717da8990bd6b5e07da97771 (patch) | |
tree | 6f198f90a9e724aca481a05354be75567ae2bd2a /plugins/check_gluster_syslog.py | |
parent | 5c7a2558334714e55f59ad8c75debe303c420ba4 (diff) |
nagios-plugins: Fixed exit status and message for quota plugin
Changed the passive service check to return warning when soft
limit exceeded
Also corrected the message- if only soft limit exceeded, the
message should not contain any entry for hard limit.
Change-Id: Ice693997c769d9029825fcd4aafacc45d1577e23
Signed-off-by: Sahina Bose <sabose@redhat.com>
Reviewed-on: http://review.gluster.org/7706
Diffstat (limited to 'plugins/check_gluster_syslog.py')
-rwxr-xr-x | plugins/check_gluster_syslog.py | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/plugins/check_gluster_syslog.py b/plugins/check_gluster_syslog.py index e71647a..d83e302 100755 --- a/plugins/check_gluster_syslog.py +++ b/plugins/check_gluster_syslog.py @@ -37,13 +37,6 @@ def findVolName(pattern): return pattern[pattern.find('-') + 1:pattern.rfind('-')] -def getStatusCode(alertlevel): - if alertlevel == 'ALERT': - return utils.PluginStatusCode.CRITICAL - else: - return utils.PluginStatusCode.WARNING - - def processQuotaMsg(msg, alertlevel): quotapat = re.compile(r'\b\d*-[a-zA-Z0-9_-]*-quota\b') matches = quotapat.search(msg) @@ -55,7 +48,7 @@ def processQuotaMsg(msg, alertlevel): serviceName = nscautils.vol_service_name(volname, "Quota") nscautils.send_to_nsca_subproc(nscautils.getNagiosClusterName(), serviceName, - getStatusCode(alertlevel), + utils.PluginStatusCode.WARNING, alertMsg) |