You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ad...@apache.org on 2018/04/16 11:40:21 UTC
[ambari] branch trunk updated: AMBARI-22834. Fix Zeppelin service
check pid file (#304)
This is an automated email from the ASF dual-hosted git repository.
adoroszlai pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/trunk by this push:
new ba2d028 AMBARI-22834. Fix Zeppelin service check pid file (#304)
ba2d028 is described below
commit ba2d0287401352982f1e8493f8276a9f9d2c481c
Author: Matthias <50...@users.noreply.github.com>
AuthorDate: Mon Apr 16 13:40:17 2018 +0200
AMBARI-22834. Fix Zeppelin service check pid file (#304)
---
.../ZEPPELIN/0.6.0/package/scripts/alert_check_zeppelin.py | 3 ++-
.../ZEPPELIN/0.7.0/package/scripts/alert_check_zeppelin.py | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0/package/scripts/alert_check_zeppelin.py b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0/package/scripts/alert_check_zeppelin.py
index e6d7a91..cc51784 100644
--- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0/package/scripts/alert_check_zeppelin.py
+++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0/package/scripts/alert_check_zeppelin.py
@@ -29,6 +29,7 @@ sys.setdefaultencoding('utf8')
config = Script.get_config()
zeppelin_pid_dir = config['configurations']['zeppelin-env']['zeppelin_pid_dir']
+zeppelin_user = config['configurations']['zeppelin-env']['zeppelin_user']
RESULT_CODE_OK = 'OK'
RESULT_CODE_CRITICAL = 'CRITICAL'
@@ -37,7 +38,7 @@ RESULT_CODE_UNKNOWN = 'UNKNOWN'
def execute(configurations={}, parameters={}, host_name=None):
try:
- pid_file = glob.glob(zeppelin_pid_dir + '/zeppelin-*.pid')[0]
+ pid_file = glob.glob(zeppelin_pid_dir + '/zeppelin-' + zeppelin_user + '-*.pid')[0]
check_process_status(pid_file)
except ComponentIsNotRunning as ex:
return (RESULT_CODE_CRITICAL, [str(ex)])
diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/alert_check_zeppelin.py b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/alert_check_zeppelin.py
index e6d7a91..cc51784 100644
--- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/alert_check_zeppelin.py
+++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/alert_check_zeppelin.py
@@ -29,6 +29,7 @@ sys.setdefaultencoding('utf8')
config = Script.get_config()
zeppelin_pid_dir = config['configurations']['zeppelin-env']['zeppelin_pid_dir']
+zeppelin_user = config['configurations']['zeppelin-env']['zeppelin_user']
RESULT_CODE_OK = 'OK'
RESULT_CODE_CRITICAL = 'CRITICAL'
@@ -37,7 +38,7 @@ RESULT_CODE_UNKNOWN = 'UNKNOWN'
def execute(configurations={}, parameters={}, host_name=None):
try:
- pid_file = glob.glob(zeppelin_pid_dir + '/zeppelin-*.pid')[0]
+ pid_file = glob.glob(zeppelin_pid_dir + '/zeppelin-' + zeppelin_user + '-*.pid')[0]
check_process_status(pid_file)
except ComponentIsNotRunning as ex:
return (RESULT_CODE_CRITICAL, [str(ex)])
--
To stop receiving notification emails like this one, please contact
adoroszlai@apache.org.