fastapi-prometheus-grafana icon indicating copy to clipboard operation
fastapi-prometheus-grafana copied to clipboard

Grafana 8.5.3 does not know dashboard

Open JRGit4UE opened this issue 3 years ago • 5 comments

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?

JRGit4UE avatar May 26 '22 21:05 JRGit4UE

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

vali-pavel avatar Jun 16 '22 12:06 vali-pavel

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

JRGit4UE avatar Jun 21 '22 11:06 JRGit4UE

@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

  • create a prometheus data source
  • Add http://prometheus:9090 as prometheus server url instead of http://localhost:9090. Read here assuming you used docker-compose
  • go to http://localhost:3000/dashboards and select new > import > upload json file.

harshraj22 avatar Jan 02 '23 14:01 harshraj22

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

docsteveharris avatar Mar 11 '23 14:03 docsteveharris

PR is welcome to fix things :pray:

Kludex avatar Mar 13 '23 08:03 Kludex