summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorTimothy Asir Jeyasingh <tjeyasin@redhat.com>2015-04-15 12:37:45 +0530
committerSahina Bose <sabose@redhat.com>2015-05-06 00:41:46 -0700
commit98b72199b7f4ce31fec0ad2fdb4c965e7fc4471b (patch)
treef841dd00df0308023f2d3a26589d07ca6461f8a4 /plugins
parenteab0ae513700e7da50c16d568d473c342b5a2e73 (diff)
fix glusterd service status issue
This patch fixes glusterd service status issue in nagios when glusterd is hung on the node. Currently it checks the status thru pid and return the status as 'running' when it finds any pid for glusterd process. Change-Id: Ia5045cae7ef1f28d3f8bb558039f47bcbe5d101b Signed-off-by: Timothy Asir Jeyasingh <tjeyasin@redhat.com> Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1177129 Signed-off-by: Timothy Asir Jeyasingh <tjeyasin@redhat.com> Reviewed-on: http://review.gluster.org/10246 Tested-by: Timothy Asir Reviewed-by: Ramesh N <rnachimu@redhat.com> Reviewed-by: Sahina Bose <sabose@redhat.com>
Diffstat (limited to 'plugins')
-rwxr-xr-xplugins/check_proc_util.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/check_proc_util.py b/plugins/check_proc_util.py
index 2fe4aac..40bfd05 100755
--- a/plugins/check_proc_util.py
+++ b/plugins/check_proc_util.py
@@ -31,7 +31,11 @@ _checkProc = utils.CommandPath('check_proc',
_chkConfig = utils.CommandPath('chkconfig',
'/sbin/chkconfig', '/usr/sbin/chkconfig')
+_chkService = utils.CommandPath('service',
+ '/sbin/service', 'usr/sbin/service')
+
_glusterVolPath = "/var/lib/glusterd/vols"
+_checkGlusterService = [_chkService.cmd, "glusterd", "status"]
_checkNfsCmd = [_checkProc.cmd, "-c", "1:", "-C", "glusterfs", "-a", "nfs"]
_checkShdCmd = [_checkProc.cmd, "-c", "1:", "-C", "glusterfs", "-a",
"glustershd"]
@@ -39,7 +43,6 @@ _checkSmbCmd = [_checkProc.cmd, "-c", "1:", "-C", "smbd"]
_checkQuotaCmd = [_checkProc.cmd, "-c", "1:", "-C", "glusterfs", "-a",
"quotad"]
_checkBrickCmd = [_checkProc.cmd, "-C", "glusterfsd"]
-_checkGlusterdCmd = [_checkProc.cmd, "-c", "1:", "-w", "1:1", "-C", "glusterd"]
_checkCtdbCmd = [_checkProc.cmd, "-c", "1:", "-C", "ctdbd"]
_chkConfigCtdb = [_chkConfig.cmd, "ctdb"]
checkIdeSmartCmdPath = utils.CommandPath(
@@ -232,7 +235,7 @@ def getShdStatus(volInfo):
def getGlusterdStatus():
- status, msg, error = utils.execCmd(_checkGlusterdCmd)
+ status, msg, error = utils.execCmd(_checkGlusterService)
if status == utils.PluginStatusCode.OK:
return status, "Process glusterd is running"
elif status == utils.PluginStatusCode.CRITICAL: