You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by av...@apache.org on 2016/02/16 23:41:25 UTC
ambari git commit: AMBARI-15063 : Metrics monitor fails on restart
(avijayan)
Repository: ambari
Updated Branches:
refs/heads/branch-2.2 3ed2eb1c2 -> 2daca3ca6
AMBARI-15063 : Metrics monitor fails on restart (avijayan)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2daca3ca
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2daca3ca
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2daca3ca
Branch: refs/heads/branch-2.2
Commit: 2daca3ca63461fc33681efc8d9a3148ed864c00d
Parents: 3ed2eb1
Author: Aravindan Vijayan <av...@hortonworks.com>
Authored: Tue Feb 16 14:34:31 2016 -0800
Committer: Aravindan Vijayan <av...@hortonworks.com>
Committed: Tue Feb 16 14:34:31 2016 -0800
----------------------------------------------------------------------
.../conf/unix/ambari-metrics-monitor | 6 +++---
.../conf/unix/ambari-metrics-collector | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/2daca3ca/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/ambari-metrics-monitor
----------------------------------------------------------------------
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 815b3e4..aa4ae02 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
@@ -131,7 +131,7 @@ case "$1" in
echo "Checking for previously running Metric Monitor..."
if [ -f ${PIDFILE} ]; then
PID=`cat ${PIDFILE}`
- if [ -z "`ps ax -o pid | grep ${PID}`" ]; then
+ if [ -z "`ps ax -o pid | grep -w ${PID} | grep resource_monitoring`" ]; then
echo "${PIDFILE} found with no process. Removing ${PID}..."
rm -f ${PIDFILE}
else
@@ -152,7 +152,7 @@ case "$1" in
sleep 2
echo "Verifying ${METRIC_MONITOR} process status..."
- if [ -z "`ps ax -o pid | grep ${PID}`" ]; then
+ if [ -z "`ps ax -o pid | grep -w ${PID} | grep resource_monitoring`" ]; then
if [ -s ${OUTFILE} ]; then
echo "ERROR: ${METRIC_MONITOR} start failed. For more details, see ${OUTFILE}:"
echo "===================="
@@ -173,7 +173,7 @@ case "$1" in
if [ -f ${PIDFILE} ]; then
PID=`cat ${PIDFILE}`
echo "Found ${METRIC_MONITOR} PID: $PID"
- if [ -z "`ps ax -o pid | grep ${PID}`" ]; then
+ if [ -z "`ps ax -o pid | grep -w ${PID} | grep resource_monitoring`" ]; then
echo "${METRIC_MONITOR} not running. Stale PID File at: $PIDFILE"
retcode=2
else
http://git-wip-us.apache.org/repos/asf/ambari/blob/2daca3ca/ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector b/ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector
index f83af50..e319d73 100644
--- a/ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector
+++ b/ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector
@@ -267,7 +267,7 @@ function start()
sleep 2
echo "Verifying ${METRIC_COLLECTOR} process status..." | tee -a $STARTUPFILE
- if [ -z "`ps ax -o pid | grep ${PID}`" ]; then
+ if [ -z "`ps ax | grep -w ${PID} | grep ApplicationHistoryServer`" ]; then
if [ -s ${OUTFILE} ]; then
echo "ERROR: ${METRIC_COLLECTOR} start failed. For more details, see ${OUTFILE}:" | tee -a $STARTUPFILE
echo "===================="