Skip to content
Snippets Groups Projects
Commit 98ebad01 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

set status in dependency of "(healthy)" in status

parent fbd45da4
No related branches found
No related tags found
1 merge request!309set status in dependency of "(healthy)" in status
......@@ -173,10 +173,8 @@ sStatus+=") .. "
sStatus+="containers: $iCTotal running: $iCRunning paused: $iCPaused stopped: $iCStopped .. "
sStatus+="images: $iImages"
ph.status "$sStatus"
echo "$out"
if [ $bOptContainers -eq 1 ] && [ "$iCTotal" -gt "0" ]; then
out+="$(
echo
echo "Containers:"
# containers=$( sudo -n --preserve-env docker ps --all --format '{"Names": "{{.Names}}", "State": "{{.State}}", "Status": "{{.Status}}" }' 2>/dev/null )
......@@ -199,9 +197,16 @@ if [ $bOptContainers -eq 1 ] && [ "$iCTotal" -gt "0" ]; then
done
echo
)"
fi
if grep -q "^??" <<< "$out"; then
ph.setStatus critical
fi
ph.status "$sStatus"
echo "$out"
# if -d was given then show debug infos too
test $bOptDebug -eq 1 && ( echo; echo "DEBUG: full docker system infos as json"; echo "$data" | jq ; _debugInfos)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment