diff --git a/changelogs/unreleased/6523-therealak12-small.md b/changelogs/unreleased/6523-therealak12-small.md new file mode 100644 index 00000000000..478f6666603 --- /dev/null +++ b/changelogs/unreleased/6523-therealak12-small.md @@ -0,0 +1 @@ +Improve shutdown manager query to the Envoy stats endpoint for active connections by utilizing a regex filter query param. diff --git a/cmd/contour/shutdownmanager.go b/cmd/contour/shutdownmanager.go index 305a5303903..fc22a473ba0 100644 --- a/cmd/contour/shutdownmanager.go +++ b/cmd/contour/shutdownmanager.go @@ -31,7 +31,9 @@ import ( ) const ( - prometheusURL = "http://unix/stats/prometheus" + // The prometheusURL is used to fetch the envoy metrics. Note that the filter + // value matches Envoy's raw stat names (i.e. those on the `/stats/` endpoint). + prometheusURL = "http://unix/stats/prometheus?filter=^http\\..*\\.downstream_cx_active$" healthcheckFailURL = "http://unix/healthcheck/fail" prometheusStat = "envoy_http_downstream_cx_active" )