Hi,
I am currently struggling with adding the homeassistant integration to grafana-agent and would appreciate if someone could help me!
Here is my setup:
home assistant and grafana agent are both running in a k3s (v1.23.3+k3s1). Prometheus is successfully scraping the home assistant metrics and curling them with curl http://<EXTERNAL IP>:8123/api/prometheus -H 'Authorization: Bearer <BEARER TOKEN'
is also successful, so I guess it is not a token issue.
I used the “grafana-easystart-app/kubernetes” way of installing a
My grafana-agent has the following configmap:
metadata:
name: grafana-agent
namespace: monitoring
apiVersion: v1
data:
agent.yaml: |
server:
http_listen_port: 12345
integrations:
node_exporter:
enabled: true
prometheus_remote_write:
...
scrape_configs:
- job_name: integrations/hass
metrics_path: /api/prometheus
bearer_token: "<TOKEN>"
scheme: https
static_configs:
- targets: ['<EXTERNAL IP>:8123']
I have already tried the following:
changing the External IP to
- namespace.servicename
- service-ip
Changing the bearer_token to:
- “”
- ‘’
So far nothing has worked and the status of the job integrations/hass stays at 0.
Implementing it via prometheus “remote_write” seems to work. However, I would like the grafana agent to work aswell.
Any tips or anything I am missing here?
Thanks in advance!