Right now, the cos abstraction is using curl (from the grafana-agent pod) for targets to verify they are working. We should instead of that use the API provided by Grafana agent and check if target is defined in /agent/api/v1/targets.
e.g.
instead of running curl -m 5 -sS <app-name>.<namespace>.svc:5000/metrics, we should use curl -m 5 -sS localhost:12345/agent/api/v1/targets and verify tar
What needs to get done
Check what information we could get from API
Remove curl for getting metrics and use /agent/api/v1/targets instead.
Add any additional checks.
Definition of Done
Metrics targets are verified via Grafana agent API.
Context
Right now, the cos abstraction is using
curl
(from the grafana-agent pod) for targets to verify they are working. We should instead of that use the API provided by Grafana agent and check if target is defined in/agent/api/v1/targets
.e.g. instead of running
curl -m 5 -sS <app-name>.<namespace>.svc:5000/metrics
, we should usecurl -m 5 -sS localhost:12345/agent/api/v1/targets
and verify tarWhat needs to get done
/agent/api/v1/targets
instead.Definition of Done