• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

ChatGpt developed Module MMM-Dockerstat

Scheduled Pinned Locked Moved Development
27 Posts 4 Posters 4.6k Views 4 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    sdetweil @Rags
    last edited by Apr 2, 2023, 4:30 PM

    @Rags got it…

    ssh will be the fun part (I think!)

    Sam

    How to add modules

    learning how to use browser developers window for css changes

    1 Reply Last reply Reply Quote 0
    • K Offline
      karsten13 @Rags
      last edited by Apr 2, 2023, 5:04 PM

      @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)

      R 1 Reply Last reply Apr 3, 2023, 2:40 AM Reply Quote 0
      • R Offline
        Rags @karsten13
        last edited by Rags Apr 3, 2023, 2:44 AM Apr 3, 2023, 2:40 AM

        @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.!
        2023-04-03_07-55-53.png

        Docker ps -a gives this output listing all containers whether up or exited. I need to just pickup name and status
        2023-04-03_08-12-19.png
        Now just need to workout (as Sam says ‘the fun part’) ssh into second pi retrieve the docker ps -a and display.

        K 1 Reply Last reply Apr 3, 2023, 7:46 PM Reply Quote 0
        • K Offline
          karsten13 @Rags
          last edited by Apr 3, 2023, 7:46 PM

          @Rags

          missed the -a

          ❯ docker ps -a --format "{{.Names}} {{.State}}"
          magicmirror running
          watchtower running
          traefik running
          
          R 1 Reply Last reply Apr 4, 2023, 8:18 AM Reply Quote 0
          • R Offline
            Rags @karsten13
            last edited by Rags Apr 4, 2023, 8:35 AM Apr 4, 2023, 8:18 AM

            @karsten13 said in ChatGpt developed Module MMM-Dockerstat:

            @Rags

            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 });
            })

            1 Reply Last reply Reply Quote 0
            • 1
            • 2
            • 3
            • 3 / 3
            3 / 3
            • First post
              27/27
              Last post
            Enjoying MagicMirror? Please consider a donation!
            MagicMirror created by Michael Teeuw.
            Forum managed by Sam, technical setup by Karsten.
            This forum is using NodeBB as its core | Contributors
            Contact | Privacy Policy