Skip to content

Commit

Permalink
Merge pull request #20 from toricls/more-info-on-managed-agents-check
Browse files Browse the repository at this point in the history
Show `lastStartedAt` on managed agent's status
  • Loading branch information
toricls authored Apr 13, 2021
2 parents 879bdbb + fdef4de commit f03bd34
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions check-ecs-exec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -367,13 +367,14 @@ else
containerName=$(echo "${describedTaskJson}" | jq -r ".tasks[0].containers[${idx}].name")
status=$(echo "${describedTaskJson}" | jq -r ".tasks[0].containers[${idx}].managedAgents[0].lastStatus")
reason=$(echo "${describedTaskJson}" | jq -r ".tasks[0].containers[${idx}].managedAgents[0].reason")
lastStartedAt=$(echo "${describedTaskJson}" | jq -r ".tasks[0].containers[${idx}].managedAgents[0].lastStartedAt")
printf " $((idx+1)). "
case "${status}" in
*STOPPED* ) printf "${COLOR_RED}STOPPED (Reason: ${reason})";;
*PENDING* ) printf "${COLOR_YELLOW}PENDING";;
* ) printf "${COLOR_GREEN}RUNNING";;
esac
printf "${COLOR_DEFAULT} for \"${containerName}\" container\n"
printf "${COLOR_DEFAULT} for \"${containerName}\" container - LastStartedAt: ${lastStartedAt}\n"
idx=$((idx+1))
done
fi
Expand All @@ -394,7 +395,7 @@ for enabled in $initEnabledList; do
*false* ) printf "${COLOR_YELLOW}Disabled";;
* ) printf "${COLOR_YELLOW}Disabled";;
esac
printf "${COLOR_DEFAULT} for \"${containerName}\" container\n"
printf "${COLOR_DEFAULT} - \"${containerName}\" container\n"
idx=$((idx+1))
done

Expand Down

0 comments on commit f03bd34

Please sign in to comment.