prom_ex
prom_ex copied to clipboard
Empty grafana dashboards
I have setup prom_ex for my phoenix elixir application as defined in the tutorial. Trying to test out the prom_ex built in plugins:
- Plugins.Application,
- Plugins.Beam,
- {Plugins.Phoenix, router: QuizRoomsWebWeb.Router, endpoint: QuizRoomsWebWeb.Endpoint}
The mix prom_ex.dashboard.publish
also executes successfully.
On running the application, I am expecting something to show up on the grafana dashboard panels, but it all seems to be empty.
My prometheus server is running on localhost:9090 and grafana is running on localhost:3000.
I have added the datasource to grafana successfully. Saving and testing works, but the output seems empty.
Am I supposed to perform some extra steps here to populate grafana with the metrics.
Please help

Does the datasource name configured in the PromEx module align with the name of the datasource in Grafana?
yep. configured the name as prometheus both on grafana and the promEx module.
Also, I cannot see the app in my prometheus targets page.
Currently running grafana and prometheus directly on my local. Not using a docker container of any kind
Based on that screenshot it doesn't look like Prometheus has been configured to actually scrape your Elixir app. It looks like it is only scraping itself. Have you updated your Prometheus config file to hit your Elixir app? Something like: https://github.com/akoutmos/prom_ex/blob/master/example_applications/shared_docker/prometheus/config.yml#L15-L17
I had totally missed that part out.
Added prometheus config file. I can see the app on my prometheus dashboard now
Getting data on the application dashboard as shown below.
and also on the beam dashboard
But nothing on the phoenix dashboard

Getting this error on the terminal

I notice that the Phoenix Endpoint dropdown in the dashboard is set to None
. I am guessing that in your PromEx config, perhaps the Endpoint module is incorrect? Also, what version of Phoenix are you running?
this is how the configuration looks right now
endpoint.ex

prom_ex.ex

phoenix version = 1.6.2
That is odd that it is dropping the telemetry handler given that your set up looks good to me. Is this a public repo that I can look at and perhaps run?
This is a private repo unfortunately. I will create a dummy phoenix umbrella project similar to this one and share the repo for you to check
Thanks :+1:
@akoutmos This is the link to the dummy prom_ex test project --> https://github.com/AbhishekBose/prom_ex_test_project
Ran it on my local and getting similar errors for phoenix and liveview dashboards. Screenshots below
Please have a look
@akoutmos Can you kindly have a look at this?
Sorry about that. I totally missed your last message. I'll have a look at your test application in a couple days as I am a bit swamped at the moment. Thanks for putting that together! That will really help :)
No problem. Thanks Looking forward!
Hey @akoutmos any updates on this?
This one is turning out to be quite a bit of work unfortunately :/. Still working on getting true umbrella support working in PromEx as this issue turns out to be the same issue as #31. That said, I probably need a couple more weeks till I land on an implementation I like.
Cool. No problem. Will be following the thread.
Getting this too, except not in an umbrella. All dashboards work but Phoenix
@shawarmaz I was having the same problem until I enabled the Phoenix plugin in my lib/my_app/prom_ex.ex
module by uncommenting the relevant lines in the plugins
section and the dashboards
section.
After that, I restarted the server and it was smooth sailing!