How to monitor whether upstreams are active with Prometheus?

I know there is a special API to see what upstreams are available.

And I know and have setup monitoring of caddy.
Now I expected to also see/get the upstream data from Caddy into Prometheus (and from there in Grafana).

However, I see “only” these metrics are exposed:

So is there a way to get that data too in Prometheus?
As we/you can see, it is obviously available.

That data wasn’t added to metrics (yet).

To be frank, @hairyhenderson introduced the metrics feature to Caddy, but neither Matt or I really know how to use it or maintain it :grimacing:.

(As an aside, the way metrics are set up in Caddy is somewhat incompatible with the way Caddy is configured, i.e. reloadable config, because the metrics can’t be changed once they’re first set up when the process starts. Ideally, metrics would be configurable, so certain things could be opt-in/out, and certain labels could be added dynamically… or something. But that’s not how it works :frowning_face:)


Okay, so shall I open a new feature request?

BTW asked a related question about this:

Okay, as no answer is also an answer, I just assumed yes now. :stuck_out_tongue_winking_eye: :wink:

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