summaryrefslogtreecommitdiff
path: root/ambari-metrics/ambari-metrics-host-monitoring
diff options
context:
space:
mode:
Diffstat (limited to 'ambari-metrics/ambari-metrics-host-monitoring')
-rw-r--r--ambari-metrics/ambari-metrics-host-monitoring/conf/unix/ambari-metrics-monitor18
1 files changed, 18 insertions, 0 deletions
diff --git a/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/ambari-metrics-monitor b/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/ambari-metrics-monitor
index 5779b5b40e..aaa77c4e7e 100644
--- a/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/ambari-metrics-monitor
+++ b/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/ambari-metrics-monitor
@@ -102,6 +102,24 @@ while [[ -z "${_ams_configs_done}" ]]; do
esac
done
+#execute ams-env.sh
+if [[ -f "${MONITOR_CONF_DIR}/ams-env.sh" ]]; then
+ . "${MONITOR_CONF_DIR}/ams-env.sh"
+else
+ echo "ERROR: Cannot execute ${MONITOR_CONF_DIR}/ams-env.sh." 2>&1
+ exit 1
+fi
+
+# Set log directory path
+if [[ -n "${AMS_MONITOR_LOG_DIR}" ]]; then
+ OUTFILE=${AMS_MONITOR_LOG_DIR}/ambari-metrics-monitor.out
+fi
+
+# Set pid directory path
+if [[ -n "${AMS_MONITOR_PID_DIR}" ]]; then
+ PIDFILE=${AMS_MONITOR_PID_DIR}/ambari-metrics-monitor.pid
+fi
+
case "$1" in
start)