diff --git a/root/var/signalytic/clientapps/streamline/streamline-emr/monitor b/root/var/signalytic/clientapps/streamline/streamline-emr/monitor index 9caf5ace..824a808e 100755 --- a/root/var/signalytic/clientapps/streamline/streamline-emr/monitor +++ b/root/var/signalytic/clientapps/streamline/streamline-emr/monitor @@ -9,7 +9,7 @@ fi # get container info APP_CONTAINER=${APP_CONTAINER:-streamline-emr} -if [ -f ${LOCATION}/.env ]; then +if grep -q "^APP_CONTAINER=" ${LOCATION}/.env > /dev/null 2>&1; then APP_CONTAINER=$(sed -n 's/APP_CONTAINER=//p' ${LOCATION}/.env) fi @@ -29,7 +29,7 @@ pushd $LOCATION > /dev/null done # get resource usage echo "checking streamline-emr resource usage" - status=$(docker stats --no-stream --format '{"name":"{{.Name}}","cpu_p":"{{.CPUPerc}}","mem_p":"{{.MemPerc}}","mem_u":"{{.MemUsage}}","net_io":"{{.NetIO}}"},"block_io":"{{.BlockIO}}"}' ${APP_CONTAINER}) + status=$(docker stats --no-stream --format '{"name":"{{.Name}}","cpu_p":"{{.CPUPerc}}","mem_p":"{{.MemPerc}}","mem_u":"{{.MemUsage}}","net_io":"{{.NetIO}}","block_io":"{{.BlockIO}}"}' ${APP_CONTAINER}) if [ "${status}" ]; then echo $status if [ "$SYSTEMLOG" -eq 1 ]; then