From 60064cf343ac5c4393f0cef65a21cb505edcff10 Mon Sep 17 00:00:00 2001 From: Sahina Bose Date: Tue, 11 Nov 2014 16:49:00 +0530 Subject: plugins: Change the message for quorum plugin The message for Cluster-quorum monitoring contained the volume names too...removed this as it was retained even post volume deletion Bug-Url: https://bugzilla.redhat.com/1109702 Change-Id: Ibcb4cfcdb10041e83976e8672623a0140777a539 Signed-off-by: Sahina Bose Reviewed-on: http://review.gluster.org/9095 Reviewed-by: Ramesh N --- plugins/check_gluster_syslog.py | 3 ++- tests/test_check_gluster_syslog.py | 4 +--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/plugins/check_gluster_syslog.py b/plugins/check_gluster_syslog.py index db27f53..46bc344 100755 --- a/plugins/check_gluster_syslog.py +++ b/plugins/check_gluster_syslog.py @@ -53,16 +53,17 @@ def processQuorumMsg(msgid, msg, level): # [MSGID: 106002] Server quorum lost for volume dist. # Stopping local bricks. # [MSGID: 106001] Server quorum not met. Rejecting operation. + alertMsg = "QUORUM: Server quorum lost." pluginstatus = utils.PluginStatusCode.CRITICAL # elif msgid == 106003: elif "[MSGID: 106003]" in msg: # [MSGID: 106003] Server quorum regained for volume dist. # Starting local bricks. + alertMsg = "QUORUM: Server quorum regained." pluginstatus = utils.PluginStatusCode.OK if pluginstatus >= 0: serviceName = "Cluster - Quorum" - alertMsg = "QUORUM:" + msg[msg.rfind(':') + 1:] nscautils.send_to_nsca_subproc(nscautils.getNagiosClusterName(), serviceName, pluginstatus, diff --git a/tests/test_check_gluster_syslog.py b/tests/test_check_gluster_syslog.py index bfa6ec1..c5d64df 100644 --- a/tests/test_check_gluster_syslog.py +++ b/tests/test_check_gluster_syslog.py @@ -60,9 +60,7 @@ class TestGlusterSyslog(TestCaseBase): mock_send_to_nsca.assert_called_with("test-cluster", "Cluster - Quorum", utils.PluginStatusCode.CRITICAL, - "QUORUM: Server quorum lost " - "for volume dist. " - "Stopping local bricks. ") + "QUORUM: Server quorum lost.") @mock.patch('plugins.nscautils.getNagiosClusterName') @mock.patch('plugins.nscautils.send_to_nsca_subproc') -- cgit