Closed conradwt closed 9 months ago
My issue was that I was using the wrong URL when using Docker Desktop. Thus, I needed to do the following:
change
- job_name: 'phoenix_app'
scrape_interval: 5s
static_configs:
- targets: ['localhost:4000']
to
- job_name: 'phoenix_app'
scrape_interval: 5s
static_configs:
- targets: ['host.docker.internal:4000']
Now, I'm seeing the expected data within all the Grafana dashboards. Thus, I'm going to close this issue.
Describe the bug
After going through the
prom_ex.ex
file, I'm seeing empty dashboards for a Phoenix application.Next, I verified that I was using the same Grafana data source name in both the Phoenix app and within Grafana UI.
config/config.exs:
docker-compose.yaml:
prom_ex.ex:
To Reproduce Steps to reproduce the behavior:
Expected behavior
I would expect to see some data in each one of the dashboards.
Environment
Additional context
I'm not sure what's the ideal setup for PromEx. The application is being run on http://localhost:4000/graphiql (UI) or http://localhost:4000/graphql (API). The Phoenix app doesn't use Docker and simply runs on macOS 13.5.1 (Ventura). However, I'm using Docker Compose to run both Grafana (http://localhost:3000) and Prometheus (http://localhost:9090) within my local development environment. Finally, I'm using Bandit instead of Cowboy for the webserver.