Kludex / fastapi-prometheus-grafana

FasAPI + Prometheus + Grafana! :tada:
MIT License
178 stars 48 forks source link

Grafana 8.5.3 does not know dashboard #4

Open JRGit4UE opened 2 years ago

JRGit4UE commented 2 years ago

On my Ubuntu 20.04 running Docker 20.10.12 after docker-compose up --build I can see all 3 services up and running, but Grafana does not show any fastAPI Dashboard.
Service app runs on 238.11 and shows HTTP 200 GET /metrics Service prometheus seems to be ok as well,
only grafana does not come up with any dashboard.
I tried to change the target volume for
./datasource.yml:/etc/grafana/provisioning/datasource.yml to
/etc/grafana/provisioning/datasources/datasource.yml
but without luck. How does fastapi-dashboard.json get mounted into grafana? Can anybody please give me a hint what's missing?

vali-pavel commented 2 years ago

I have the same issue, all services are up, but nothing shows up in grafana

JRGit4UE commented 2 years ago

@vali-pavel It looks like, the dashboard is not loaded by default, you have to import it.

harshraj22 commented 1 year ago

@JRGit4UE what did you add for data source of prometheus while importing fastapi-dashboard.json in graphana dashboard ?

Edit: Adding details in case someone else comes to this issue

docsteveharris commented 1 year ago

I also had to adjust the docker compose file so this line changes from

      - ./datasource.yml:/etc/grafana/provisioning/datasource.yml

to

      - ./datasource.yml:/etc/grafana/provisioning/datasources/datasource.yml
Kludex commented 1 year ago

PR is welcome to fix things :pray: