Docker Community Forums

Share and learn in the Docker community.

PDF report for Grafana Dashboard

Hello Team,

Can anyone help me to write docker-compose file for grafana reporter,
followed this article

My docker-compose file:
version: “3.2”
services:
monitoring:
image: monitoring
user: “root”
depends_on:
- prometheus
ports:
- “3000:3000”
networks:
- back-tier
- front-tier
restart: “always”
links:
- prometheus:prometheus
volumes:
- type: volume
source: ./grafana/data
target: /var/lib/grafana
- type: volume
source: ./grafana/provisioning
target: /etc/grafana/provisioning/
env_file:
- ./grafana/conf/config.monitoring

grafana-reporter:

container_name: grafana-reporter

  image: izakmarais/grafana-reporter:${gr_version:-latest}
  command: -ip=100.64.x.x:3000
  networks:
    - back-tier
  ports:
    - 8686:8686
  restart: always

prometheus:
image: prom/prometheus:latest
user: “root”
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
links:
- node-exporter:node-exporter
- cadvisor:cadvisor

- blackbox_exporter

networks:
  - back-tier
restart: always

telegraf:
container_name: telegraf
image: telegraf:1.9.4-alpine
networks:
- back-tier
volumes:
- ./telegraf/telegraf.conf:/etc/telegraf/telegraf.conf
- /var/run/docker.sock:/var/run/docker.sock
restart: always

node-exporter:
image: prom/node-exporter
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
command:
- ‘–path.procfs=/host/proc’
- ‘–path.sysfs=/host/sys’
- --collector.filesystem.ignored-mount-points
- “^/(sys|proc|dev|host|etc|rootfs/var/lib/docker/containers|rootfs/var/lib/docker/overlay2|rootfs/run/docker/netns|rootfs/var/lib/docker/aufs)($$|/)”
ports:
- 9100:9100
networks:
- back-tier
restart: always
deploy:
mode: global
cap_add:
- ALL

#added for website monitoring
black-exporter:
image: prom/blackbox-exporter
hostname: black-exporter
volumes:

- ./config/blackbox.yml:/opt/data/monitoring/docker-composer-ubuntu-v2/blackbox/blackbox.yml

  - ./blackbox/blackbox.yml:/config/blackbox.yml
command:
  - '--config.file=/config/blackbox.yml'
ports:
  - '9115:9115'
networks:
  - back-tier
links:
  - prometheus:prometheus
restart: always

alertmanager:
image: prom/alertmanager
ports:
- 9093:9093
volumes:
- ./alertmanager/:/etc/alertmanager/
networks:
- back-tier
restart: always
command:
- ‘–config.file=/etc/alertmanager/config.yml’
- ‘–storage.path=/alertmanager’
cadvisor:
image: google/cadvisor
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
ports:
- 8080:8080
networks:
- back-tier
restart: always
deploy:
mode: global

volumes:
prometheus_data: {}
grafana_data: {}

networks:
back-tier:
front-tier:

Please find the grafana-reporter-logs1 Docker container(grafana-reporter) logs

Please share your suggestion on this.

Thank you.

Now I can download reports.