grafana / docker-otel-lgtm

OpenTelemetry backend in a Docker image
Apache License 2.0
313 stars 55 forks source link

Make grafana-dashboards.yaml configurable #117

Closed brunobat closed 1 month ago

brunobat commented 1 month ago

We have this issue in Quarkus to create dashboards for our metrics and we were unable to place our dashboards without a hack. Issue: https://github.com/quarkusio/quarkus/pull/41264

It would be nice if you placed in the grafana.ini the location of grafana-dashboards.yaml at /otel-lgtm, this way we could override the dashboards at our convenience.

The current location is version dependent, under ./grafana-v<grafana-version>/conf/provisioning/dashboards/grafana-dashboards.yaml

zeitlinger commented 1 month ago

what if we just remove the version from the path?

I currently don't have a grafana.ini and would like to keep it that way if possible

brunobat commented 1 month ago

Removing the version from the path would also work, thanks.

zeitlinger commented 1 month ago

it seems this is already the case:

sh-5.1# pwd
/otel-lgtm/grafana/conf/provisioning/dashboards
sh-5.1# cat grafana-dashboards.yaml 
apiVersion: 1

providers:
  - name: 'RED Metrics (classic histogram)'
    type: file
    options:
      path: /otel-lgtm/grafana-dashboard-red-metrics-classic.json
      foldersFromFilesStructure: false
  - name: 'RED Metrics (exponential/native histogram)'
    type: file
    options:
      path: /otel-lgtm/grafana-dashboard-red-metrics-native.json
      foldersFromFilesStructure: false
  - name: 'JVM Metrics'
    type: file
    options:
      path: /otel-lgtm/grafana-dashboard-jvm-metrics.json
      foldersFromFilesStructure: false
brunobat commented 1 month ago

Thanks @zeitlinger. We will update our extension to use your latest image.