vmagent: set consul datacenter (fix 0 discovered targets) #240
Reference in New Issue
Block a user
Delete Branch "benvin/vmagent-consul-datacenter"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
The Consul SD job discovered 0 targets. vmagent logs showed it reaching the puppet Consul fine (TLS/connectivity OK) but getting
403onGET /v1/agent/self: the anonymous tokenlacks permission 'agent:read'. VictoriaMetrics calls/v1/agent/selfonly to auto-detect the datacenter; catalog/health reads (what SD actually needs) work anonymously.Fix
Set
datacenter: au-syd1on the consul_sd_config so VM skips theagent/selfcall. No consul token needed.Verify after sync
vmagent
/targets→consuljob shows the puppet targets (haproxy/ceph/gitea/node/…) up.