An out-of-the-box solution to completely monitor your Docker Swarm environments. The monitoring stack uses Prometheus, Grafana, Alertmanager, Traefik and some exporters like cAdvisor.
The integration and management process simplified with a Golang app, which can create the stack with the relevant configs based on your needs. Also it can update the services if you want to change some parameters and can execute some basic Docker options from CLI.
The project is still in a development state, if you have any issues or bugs please contact me.
- A manager node (with ssh access) and atleast a worker node
- Docker daemon configured to expose metrics (with experimental features enabled)
- Golang installed on your local machine (to build the binary)
You have to clone the repo, build the binary and copy the config folder and the built binary to the remote host.
git clone https://github.com/bbabos/swarmon.git && cd swarmon/
GOOS=linux GOARCH=amd64 go build
- copy the configs folder and the built binary from the root directory to the remote host
- start the binary with this command:
./swarmon
- prometheus (centralized metrics database)
- grafana (metric visualizer)
- alertmanager (alert handler)
- traefik (reverse proxy and basic auth provider)
- cadvisor (container metrics collector)
- dockerd-exporter (Docker daemon metrics collector)
- node-exporter (host metrics collector)
├── main.go
├── go.mod
├── go.sum
├── README.md
├── cmd
│ ├── config
│ │ ├── config.go
│ │ └── types.go
│ ├── docker
│ │ ├── containers.go
│ │ ├── nodes.go
│ │ └── services.go
│ ├── page
│ │ ├── containerPage.go
│ │ ├── menuPages.go
│ │ ├── nodePage.go
│ │ ├── page.go
│ │ ├── servicePage.go
│ │ └── stackPage.go
│ └── utils
│ └── utils.go
├── configs
│ └── docker
│ ├── alertmanager
│ │ ├── Dockerfile
│ │ └── conf
│ │ ├── alertmanager.yml
│ │ └── entrypoint.sh
│ ├── docker-compose.yml
│ ├── dockerd-exporter
│ │ ├── Dockerfile
│ │ └── conf
│ │ └── entrypoint.sh
│ ├── grafana
│ │ ├── Dockerfile
│ │ ├── dashboards
│ │ │ ├── nodes-dash.json
│ │ │ ├── prometheus-dash.json
│ │ │ └── services-dash.json
│ │ ├── dashboards.yml
│ │ └── datasources
│ │ └── prometheus.yaml
│ ├── node-exporter
│ │ ├── Dockerfile
│ │ └── conf
│ │ └── entrypoint.sh
│ ├── parsed.yml
│ └── prometheus
│ ├── Dockerfile
│ ├── conf
│ │ └── prometheus.yml
│ └── rules
│ ├── swarm_node_rules.yml
│ └── swarm_task_rules.yml
├── scripts
├── build.sh
├── test.sh
└── deploy.sh