hello,
is there a way to output metrics about requests sent to upstreams and their information
in prometheus /metrics output?
been trying to find info and there seem to be no documentation about that
functionality.
sources mention dedicated /upstreams endpoint
https://gitlab.nic.cz/knot/knot-resolver/-/blob/master/modules/http/prometh…
but /upstreams returns empty list.
currently trying to run this config:
modules = {
'hints > iterate',
'stats',
'predict',
'http',
}
net.listen('0.0.0.0', 53, { kind = 'dns' })
net.listen('0.0.0.0', 9053, { kind = ‘webmgmt' })
cache.size = 256 * MB
cache.storage = "lmdb:///dev/shm/knot-resolver”
policy.add(
policy.all(
policy.TLS_FORWARD({
{'1.1.1.1', hostname='cloudflare-dns.com' },
{'1.0.0.1', hostname='cloudflare-dns.com' },
})
)
)
is there a way to get upstreams info?
running modules.load('stats’) and then stats.upstreams() from ‘runtime’
configuration returns upstream request details like described here
https://knot-resolver.readthedocs.io/en/stable/modules-stats.html
thanks