- The DevOps 2.2 Toolkit
- Viktor Farcic
- 282字
- 2021-06-24 18:46:22
Deploying Docker Flow Monitor
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 improvement but is a good start. More powerful additions will be explored later on.
Please visit environment variables section of the documentation for more information about configuration options at (http://monitor.dockerflow.com/config/#environment-variables).
Now we're ready to deploy the stack:
docker stack rm monitor docker stack deploy \ -c stacks/docker-flow-monitor.yml \ monitor
Please wait a few moments until Swarm pulls the image and starts the service. You can monitor the status by executing docker stack ps monitor command.
Once the service is running, we can confirm that the environment variable indeed generated the configuration:
open "http://$(docker-machine ip swarm-1):9090/config"

We are going to expose services url in pretty format, therefore we must get rid of port number (9090) in preceding url.
- 人類學(xué)的詩(shī)學(xué)探索
- 廣東省社會(huì)建設(shè)藍(lán)皮書(shū)(2012-2013年度)
- 盛衰之間:上海評(píng)彈界的組織化(1951—1960)
- 社會(huì)救助與社會(huì)福利新論(修訂本)
- 電學(xué)領(lǐng)域?qū)彶閷?shí)務(wù)(第二輯)
- 中國(guó)當(dāng)代文學(xué)會(huì)議研究
- 中俄農(nóng)村圖書(shū)館建設(shè)歷史與經(jīng)驗(yàn)比較研究:以俄羅斯遠(yuǎn)東和中國(guó)東北為例
- 科學(xué):無(wú)盡的前沿
- 浙江省產(chǎn)業(yè)技術(shù)創(chuàng)新生態(tài)系統(tǒng)研究
- 戰(zhàn)略落地
- “大而不倒”問(wèn)題研究:政府對(duì)失敗大金融機(jī)構(gòu)救助的動(dòng)機(jī)、風(fēng)險(xiǎn)及其防范
- 天下為公:社會(huì)變遷視角下中國(guó)民眾的公平感
- 華僑華人與西南邊疆社會(huì)穩(wěn)定
- 科研倫理與學(xué)術(shù)規(guī)范:《高等學(xué)校預(yù)防和處理學(xué)術(shù)不端行為辦法》一百問(wèn)
- 男人辭典