PDF report for Grafana Dashboard

229 views
Skip to first unread message

mohd

unread,
Jan 23, 2020, 6:39:03 AM1/23/20
to Prometheus Users
Hello Team,

We want a Grafana Dashboard report on some regular basis.
Tried to add grafana reportor in docker-compose, but no success, could anybody help me with this.

Here is my docker-compose.yml 
version: "3.2"
services:
  monitoring:
    image: grafana/grafana
    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:
      image: izakmarais/grafana-reporter:${gr_version:-latest}
      command: -ip=hostIP: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

  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:



Could anyone guide me how to write docker-compose to have a grafana reporter in order get PDF for grafana dashboard.
Your help would be greatly appreciated.

Thank you.

mohd

unread,
Jan 23, 2020, 7:28:55 AM1/23/20
to Prometheus Users
Here is the logs of the grafana-reporter container:

Thank you.
grafana-reporter-logs.png

mohd

unread,
Jan 27, 2020, 4:52:24 AM1/27/20
to Prometheus Users
Hi team,

Any suggestions please.


On Thursday, 23 January 2020 17:09:03 UTC+5:30, mohd wrote:

Brian Candler

unread,
Jan 27, 2020, 9:38:01 AM1/27/20
to Prometheus Users
This is prometheus mailing list - for problems with grafana, you may be better off asking on a grafana group.  For problems with docker compose, then a docker group.
Reply all
Reply to author
Forward
0 new messages