consul_exporter
consul_exporter copied to clipboard
Not able to get key value metrics exported
I am trying to load kv from consul with --kv.prefix=/. Its bringing nothing
Can you share the exporter's logs as well as command line flags?
Logs are
level=info ts=2020-02-19T12:59:41.596Z caller=consul_exporter.go:462 msg="Starting consul_exporter" version="(version=0.6.0, branch=HEAD, revision=79bc2cc7095de15a843a538a8edc3f1f254c2848)" level=info ts=2020-02-19T12:59:41.597Z caller=consul_exporter.go:463 build_context="(go=go1.13.5, user=root@4a16293ae5a8, date=20191216-15:37:09)" level=info ts=2020-02-19T12:59:41.597Z caller=consul_exporter.go:514 msg="Listening on address" address=:9107
and flag are --kv.prefix=/
Nope. none even not able to read numeric values
I've just checked and it works for me.
Colud you please share with me key and its value, and also please share flags Thanks in advance
The flags are --kv.prefix=/
, my key is foo
and its value is 1.20
.
I have the same issue. I found that the value stored in Consul kv storage is encoded with base64 by default, but I did not find decode operation in https://github.com/prometheus/consul_exporter/blob/master/consul_exporter.go#L428 Is that the reason?
I add the key by HTTP API, e.g.
curl \
--insecure \
--header "X-Consul-Token: <token>" \
--request PUT \
"https://localhost:8501/v1/kv/xxx" \
-d '123'
I solved it by adding the right permission for the consul agent ACL token.
@yujhe Do you mind sharing what were the right permissions?