sipcapture/homer7-docker

Grafana dashboards for multiple promethus targets

perrfect opened this issue · 4 comments

Hello.

I have two Heplify-server on different location (e.g EU and US), one Database server and one Prometheus server.
All data from two heplify-server write on the same database and one prometheus.

Prometheus configuration:

- job_name: heplify-server-eu
  honor_timestamps: true
  scrape_interval: 5s
  scrape_timeout: 5s
  metrics_path: /metrics
  scheme: http
  follow_redirects: true
  enable_http2: true
  static_configs:
  - targets:
    - test-eu:9096
- job_name: heplify-server-us
  honor_timestamps: true
  scrape_interval: 5s
  scrape_timeout: 5s
  metrics_path: /metrics
  scheme: http
  follow_redirects: true
  enable_http2: true
  static_configs:
  - targets:
    - test-us:9096

Grafana visualizes data from Prometheus correctly, but on dashboards I can't understand which graph belongs each datacenters.
Is it possible to sign graphs for each datacenters? And what should be the prometheus configuration?

Hello @perrfect the simplest solution would be to add a label for each scraped DC/Region:

- job_name: 'heplify-server'
    scrape_interval: 5s
    static_configs:
      - targets: [ 'heplify-server-us:9096' ]
        labels:
          region: 'US'
      - targets: [ 'heplify-server-eu:9096' ]
        labels:
          region: 'EU'

Hello @lmangani thank you for reply.
In this case should I change something in Grafana dashboards in docker?

@perrfect not really - you're better off creating your own cloned dashboards w/ group-by or filtering by the new region labels

Closing as non-issue, feel free to comment further if suggestions are needed