mirror of
https://github.com/recklessop/zroc.git
synced 2026-07-02 21:13:15 -04:00
112 lines
3.0 KiB
YAML
112 lines
3.0 KiB
YAML
version: '3.7'
|
|
|
|
networks:
|
|
front-tier:
|
|
back-tier:
|
|
|
|
volumes:
|
|
prometheus_data: {}
|
|
grafana_data: {}
|
|
|
|
services:
|
|
|
|
# Exporter for ZVM/vCenter site 1
|
|
zertoexporter:
|
|
container_name: zvmexporter1
|
|
hostname: zvmexporter1 # this hostname will need to be set in the prometheus.yaml file as well
|
|
image: recklessop/zerto-exporter:latest
|
|
command: python python-node-exporter.py
|
|
ports:
|
|
- "9999:9999"
|
|
volumes:
|
|
- ./zvmexporter/:/usr/src/app/logs/
|
|
environment:
|
|
# Site 1 configuration settings
|
|
- VERIFY_SSL=False
|
|
- ZVM_HOST=192.168.50.60
|
|
- ZVM_PORT=443
|
|
- SCRAPE_SPEED=20 #how often should the exporter scrape the Zerto API
|
|
- CLIENT_ID=api-script
|
|
- CLIENT_SECRET=js51tDM8oappYUGRJBhF7bcsedNoHA5j
|
|
- LOGLEVEL=DEBUG
|
|
- VCENTER_HOST=192.168.50.50
|
|
- VCENTER_USER=administrator@vsphere.local
|
|
- VCENTER_PASSWORD=password
|
|
networks:
|
|
- back-tier
|
|
restart: always
|
|
|
|
# This is used for a second ZVM / vCenter (maybe your DR site?)
|
|
#zertoexporter2:
|
|
# container_name: zvmexporter2
|
|
# hostname: zvmexporter2
|
|
# image: recklessop/zerto-exporter:latest
|
|
# command: python python-node-exporter.py
|
|
# ports:
|
|
# - "9998:9999" # if you add a third or more exporters change the port number before the :
|
|
# volumes:
|
|
# - ./zvmexporter/:/usr/src/app/logs/
|
|
# environment:
|
|
# # Site 2 configuration settings
|
|
# - VERIFY_SSL=False
|
|
# - ZVM_HOST=192.168.50.30
|
|
# - ZVM_PORT=443
|
|
# - SCRAPE_SPEED=20 #how often should the exporter scrape the Zerto API
|
|
# - CLIENT_ID=api-script
|
|
# - CLIENT_SECRET=x2aokKGPyS1O6LCW2uNqm2tbko2PLUSn
|
|
# - LOGLEVEL=DEBUG
|
|
# - VCENTER_HOST=192.168.50.20
|
|
# - VCENTER_USER=administrator@vsphere.local
|
|
# - VCENTER_PASSWORD=password
|
|
# networks:
|
|
# - back-tier
|
|
# restart: always
|
|
|
|
prometheus:
|
|
image: prom/prometheus:v2.40.6
|
|
volumes:
|
|
- ./prometheus/:/etc/prometheus/
|
|
- prometheus_data:/prometheus
|
|
command:
|
|
- '--config.file=/etc/prometheus/prometheus.yml'
|
|
- '--storage.tsdb.path=/prometheus'
|
|
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
|
|
- '--web.console.templates=/usr/share/prometheus/consoles'
|
|
ports:
|
|
- 9090:9090
|
|
networks:
|
|
- back-tier
|
|
restart: always
|
|
depends_on:
|
|
- zertoexporter
|
|
|
|
grafana:
|
|
image: grafana/grafana
|
|
user: "472"
|
|
depends_on:
|
|
- prometheus
|
|
ports:
|
|
- 3000:3000
|
|
volumes:
|
|
- grafana_data:/var/lib/grafana
|
|
- ./grafana/provisioning/:/etc/grafana/provisioning/
|
|
environment:
|
|
- GF_SECURITY_ADMIN_PASSWORD=zertodata
|
|
- GF_USERS_ALLOW_SIGN_UP=false
|
|
- data-source-url=http://prometheus:9090
|
|
- name=Prometheus
|
|
- type=prometheus
|
|
- update-interval=10
|
|
networks:
|
|
- back-tier
|
|
- front-tier
|
|
restart: always
|
|
|
|
watchtower:
|
|
image: containrrr/watchtower
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
environment:
|
|
- WATCHTOWER_POLL_INTERVAL=360 # 1 hour
|
|
restart: always
|