Skip to content

Instantly share code, notes, and snippets.

@seanorama
Last active December 18, 2017 12:02
Show Gist options
  • Save seanorama/832df777d11a0fd279cd21ca8c3700b0 to your computer and use it in GitHub Desktop.
Save seanorama/832df777d11a0fd279cd21ca8c3700b0 to your computer and use it in GitHub Desktop.
--- /var/lib/ambari-server/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/alert_check_zeppelin.py (old)
+++ /var/lib/ambari-server/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/alert_check_zeppelin.py (new)
@@ -29,6 +29,7 @@
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 @@
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)])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment