Deploying Docker Flow Monitor is easy (as almost all Docker services are). We'll start by creating a network called monitor. We could let Docker stack create it for us, but it is useful to have it defined externally so that we can easily attach it to services from other stacks:
docker network create -d overlay monitor
The stack is as follows:
version: "3" services: monitor: image: vfarcic/docker-flow-monitor:${TAG:-latest} environment: - GLOBAL_SCRAPE_INTERVAL=10s networks: - monitor ports: - 9090:9090 networks: monitor: external: true
The environment variable GLOBAL_SCRAPE_INTERVAL shows the first improvement over the "original" Prometheus service. It allows us to define entries of its configuration as environment variables. That, in itself, is not a significant...