Does Caddy export expvar stats?

Does Caddy still make the ‘expvar’ package available for monitoring?

It’s not listed under monitoring in the docs.

There is only a reference to exporting stats to a prometheus server.

You can see it by making an HTTP request to /debug/vars from the admin API (localhost:2019 by default)

When I query localhost:2019/debug/vars, I noticed that in addition to the expvar stats, there are a few stats under a badger namespace, which I believe is a key value database that is used by Caddy for caching. However, when I run a bunch of loadserver requests against my website, I expect but don’t see any of those badger stats changing. They are all zeros. Also, I cloned the Caddy repo from github onto my computer and did a search for badger (hoping to find some kind of explanation) and it didn’t turn up anything.

What are those badger stats doing at the debug/vars endpoint? Do they need to be activated somehow?

No, it a dependency of our acme_server but it’s not used at all. It won’t do anything.

In the next release, we’re removing badger from the build to reduce the binary size, see core: always inject the `nobadger` build tag by mohammed90 · Pull Request #173 · caddyserver/xcaddy · GitHub

This topic was automatically closed after 60 days. New replies are no longer allowed.