Skip to content

Commit

Permalink
feat: add swarm monitoring template (portainer#181)
Browse files Browse the repository at this point in the history
  • Loading branch information
deviantony authored May 24, 2023
1 parent 4261b49 commit da7bbd2
Show file tree
Hide file tree
Showing 10 changed files with 2,029 additions and 0 deletions.
14 changes: 14 additions & 0 deletions images/monitoring/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Note: these can be overriden on the command line e.g. `make GRAF_VERSION=9.5.3 PROM_VERSION=v2.44.1`
GRAF_VERSION="9.5.2"
PROM_VERSION="v2.44.0"

.PHONY: image

grafana-image := portainer/template-swarm-monitoring:grafana-$(GRAF_VERSION)
prometheus-image := portainer/template-swarm-monitoring:prometheus-$(PROM_VERSION)

images:
docker run --privileged --rm tonistiigi/binfmt --install all
docker buildx create --use --name crossplatform-builder default
docker buildx build --platform linux/amd64,linux/arm64 --build-arg GRAFANA_VERSION=$(GRAF_VERSION) -t $(grafana-image) -f grafana/Dockerfile --push ./grafana
docker buildx build --platform linux/amd64,linux/arm64 --build-arg GRAFANA_VERSION=$(PROM_VERSION) -t $(prometheus-image) -f prometheus/Dockerfile --push ./prometheus
9 changes: 9 additions & 0 deletions images/monitoring/grafana/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
ARG GRAFANA_VERSION=9.5.2

FROM grafana/grafana:$GRAFANA_VERSION

COPY config/grafana-datasources.yml /etc/grafana/provisioning/datasources/provisioning-datasources.yaml
COPY config/grafana-dashboards.yml /etc/grafana/provisioning/dashboards/provisioning-dashboards.yaml
COPY config/dashboards/grafana-dashboard-container-metrics.json /var/lib/grafana/dashboards/container-metrics.json
COPY config/dashboards/grafana-dashboard-node-metrics.json /var/lib/grafana/dashboards/node-metrics.json

Loading

0 comments on commit da7bbd2

Please sign in to comment.