Read the statement by Michael Teeuw here.
ChatGpt developed Module MMM-Dockerstat
-
@Rags got it…
ssh will be the fun part (I think!)
-
@Rags said in ChatGpt developed Module MMM-Dockerstat:
and I would realise quite late that a particular service is down
then
docker ps --format "{{.Names}} {{.State}}"
maybe is the better choice,State
can be one of the following:(created|restarting|running|removing|paused|exited|dead)
-
@karsten13 said in ChatGpt developed Module MMM-Dockerstat:
docker ps --format "{{.Names}} {{.State}}
should this command produce an output when run directly on the docker machine? I am not getting any output.!
Docker ps -a gives this output listing all containers whether up or exited. I need to just pickup name and status
Now just need to workout (as Sam says ‘the fun part’) ssh into second pi retrieve the docker ps -a and display. -
missed the
-a
❯ docker ps -a --format "{{.Names}} {{.State}}" magicmirror running watchtower running traefik running
-
@karsten13 said in ChatGpt developed Module MMM-Dockerstat:
missed the
-a
❯ docker ps -a --format "{{.Names}} {{.State}}" magicmirror running watchtower running traefik running
Great !
Yes the command is working now but locally on the docker machine only. It needs to work from the first machine after ssh ing into docker machine.
ssh
.exec (‘docker ps -a --format “{{.Names}} {{.State}}”’)
.on(‘error’, (err) => {
console.error(Error: ${err}
);
this.status = ‘Error’;
this.sendSocketNotification(‘STATUS_UPDATE’, { status: this.status, icon: this.offlineIcon });
})