Open DnPlas opened 3 months ago
This has partly been addressed by open_ports
in https://github.com/canonical/grafana-agent-k8s-operator/pull/289, which landed in Revision 71.
The missing step is to bind 0.0.0.0
instead of localhost
in the config/layer.
Bug Description
When trying to reach the
/agent/api/v1/metrics/targets
endpoint, I repeatedly gotcurl: (7) Failed to connect to 10.1.60.144 port 12345 after 0 ms: Connection refused
error messages.When looking at the
Service
of the application, it doesn't look like it is listed inPORT(S)
:Similarly, the
juju status
output does not show anyPorts
:This suggests that the port is not open.
Workaround
The port is just not open, so we can still reach the desired endpoint from within the unit:
juju ssh grafana-agent-k8s/0 curl localhost:12345/agent/api/v1/metrics/targets
To Reproduce
juju deploy grafana-agent-k8s --channel latest/stable
curl -v <unit IP>:12345/agent/api/v1/metrics/targets
Environment
juju 3.5.1 microk8s 1.29
Relevant log output
Additional context
No response