Skip to content
A simple monitoring dashboard for Docker in Swarm Mode.
Branch: master
Clone or download
charypar Merge pull request #14 from jamesmcdonald/master
Support containers with no network connections
Latest commit 7f32d03 Nov 25, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Components Add colours to the networks May 24, 2017
Docker Support containers with no network connections Dec 7, 2017
client
server Merge branch 'master' into better-networking Aug 16, 2017
.dockerignore Stream the Docker state to Elm over a web socket Apr 30, 2017
.eslintrc Small change in linting rules Aug 13, 2017
.gitignore Setup and basic wiring Apr 30, 2017
Components.elm
Docker.elm
Dockerfile Make the build much smaller using multi-stage build and node alpine Aug 14, 2017
LICENSE Add license May 13, 2017
Main.elm Add networks display May 20, 2017
README.md Fix typo Aug 13, 2017
Util.elm Refactor the networks UI May 22, 2017
compose.yml Remove port as build-time argument May 8, 2017
elm-package.json
package.json Merge branch 'master' into better-networking Aug 16, 2017
rebuild.sh Fix stack prefix May 3, 2017
swarm.gif Update readme with animated screenshot May 6, 2017
yarn.lock Merge branch 'master' into better-networking Aug 16, 2017

README.md

Swarm Dashboard

A simple monitoring dashboard for Docker in Swarm Mode.

Example Dashboard

About

Swarm dashboard shows you all the tasks running on a Docker Swarm organised by service and node. It provides a visualisation that's space efficient and works well at a glance.

You can use it as a simple live dashboard of the state of your Swarm.

The Dashboard has a node.js server which streams swarm updates to an Elm client over a websocket.

Prior art

Running

At the moment, the dashboard needs to be deployed on one of the swarm managers. You can configure it with the following Docker compose file:

# compose.yml
version: "3"

services:
  dashboard:
    image: charypar/swarm-dashboard
    volumes:
    - "/var/run/docker.sock:/var/run/docker.sock"
    ports:
    - 8080:8080
    environment:
      PORT: 8080
    deploy:
      replicas: 1
      placement:
        constraints:
          - node.role == manager

and deploy with

$ docker stack deploy -c compose.yml svc

Production use

There are two considerations for any serious deployment of the dashboard:

  1. Security - the dashboard node.js server has access to the docker daemon unix socket and runs on the manager, which makes it a significant attack surface (i.e. compromising the dashboard's node server would give an attacker full control of the swarm)
  2. The interaction with docker API is a fairly rough implementation and is not very optimised. The server polls the API every 500 ms, publishing the response data to all open websockets if it changed since last time. There is probably a better way to look for changes in the Swarm that could be used in the future.

Rough roadmap

  • Show more service details (published port, image name and version)
  • Node / Service / Task details panel
  • Show node / task resources (CPU & Memory)
  • Improve security for potential production use

Both feature requests and pull requests are welcome

Contributors

  • Viktor Charypar (owner, BDFL) - code, docs
  • Clementine Brown - design
You can’t perform that action at this time.