#Prometheus
1 messages · Page 1 of 1 (latest)
The prometheus integration is not a prometheus data source or prometheus server. It exposes metrics in prometheus format that can be ingested into one.
Maybe I'm confused...and I'm being too vague...apologies. Let me elaborate...
I have Prometheus running, and my prometheus config yaml follows the HA docs.
Prometheus can see the data by as reported at <prom_ip>:9090/health
It shows my instance at http://<home-assistant-ip>:8123
With an endpoint of http://<home-assistant-ip>/api/prometheus
If I navigate to this I see data
When I add as a data source in Grafan (http://<home-assistant-ip>:8123) I get a 404 error. There was an error returned querying the Prometheus API.
You use your prometheus to scape HA's data and then add prometheus a data source.
This is the problem, the data is there and being scraped....but can't add that instance as a source to Grafana
What's it say?
404 Not Found - There was an error returned querying the Prometheus API.
What address/URL did you give it?
Again, grafana does not talk to HA. Use your prometheus URL.
Ok, I'll try, 2 mins
Right, I can add that
But don't see the node I set in the prom config yaml 🤦🏻♂️
I don't have a prometheus instance right now (I use VictoriaMetrics) but you should be able to see the scrape jobs on its endpoint.
I can see data at <home-assistant-ip>:8123/api/prometheus
I'm certain this is a me error, misconfiguration
What's your prometheus config look like?
Go to http://YOURPROMIP:9090/targets and see if you can see HA there.
My config:
global:
scrape_interval: 1m
scrape_timeout: 1m
evaluation_interval: 1m
scrape_configs:
- job_name: prometheus
honor_timestamps: true
scrape_interval: 1m
scrape_timeout: 30s
metrics_path: /metrics
static_configs:
- targets: ['localhost:9090']
- job_name: node
static_configs:
- targets: ['192.168.1.129:9100']
- job_name: home-assistant
scrape_interval: 60s
metrics_path: /api/prometheus
authorization:
credentials: "my long lived token"
scheme: http
static_configs:
- targets: ['192.168.1.124:8123']
If I go to http://prom-ip:9090/targets I see them --> home-assistant, node and prometheus
Can you query data directly in the prometheus UI?
I think I'm very lost now 🤦🏻♂️
If I query node_uname_info{job="home-assistant"} in Prometheus UI it returns no data.
But if just type home, I see some entities that appear to have data
What if you just do {job="home-assistant"}? Maybe node_uname_info is not provided by HA.
I'd recommend you use grafana's explore functionality.
{job="home-assistant"} returns 1000+ results