mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-02 01:27:27 -04:00
tweaking, prepare for elk microservice
This commit is contained in:
@ -11,12 +11,15 @@ myIMAGES=$(cat /etc/tpot/tpot.yml | grep container_name | cut -d: -f2)
|
||||
while true
|
||||
do
|
||||
clear
|
||||
echo "[0;0m"
|
||||
echo "======| System |======"
|
||||
echo Date:" "$(date)
|
||||
echo Uptime:" "$(uptime)
|
||||
echo CPU temp: $(sensors | grep "Physical" | awk '{ print $4 }')
|
||||
echo
|
||||
echo "NAME CREATED PORTS"
|
||||
printf "NAME"
|
||||
printf "%-15s STATUS"
|
||||
printf "%-13s PORTS\n"
|
||||
for i in $myIMAGES; do
|
||||
mySTATUS=$(/usr/bin/docker ps -f name=$i --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}" -f status=running -f status=exited | GREP_COLORS='mt=01;35' /bin/egrep --color=always "(^[_0-9a-z-]+ |$)|$" | GREP_COLORS='mt=01;32' /bin/egrep --color=always "(Up[ 0-9a-Z ]+ |$)|$" | GREP_COLORS='mt=01;31' /bin/egrep --color=always "(Exited[ \(0-9\) ]+ [0-9a-Z ]+ ago|$)|$" | tail -n 1)
|
||||
myDOWN=$(echo "$mySTATUS" | grep -c "NAMES")
|
||||
|
Reference in New Issue
Block a user