diff --git a/2.1.x/multi/multi__actuator_api.html b/2.1.x/multi/multi__actuator_api.html index 62795a94..a6bf43b9 100644 --- a/2.1.x/multi/multi__actuator_api.html +++ b/2.1.x/multi/multi__actuator_api.html @@ -1,9 +1,9 @@
-The /gateway actuator endpoint allows to monitor and interact with a Spring Cloud Gateway application. To be remotely accessible, the endpoint has to be enabled and exposed via HTTP or JMX in the application properties.
application.properties. +
The /gateway actuator endpoint allows to monitor and interact with a Spring Cloud Gateway application. To be remotely accessible, the endpoint has to be enabled and exposed via HTTP or JMX in the application properties.
application.properties.
management.endpoint.gateway.enabled=true # default value management.endpoints.web.exposure.include=gateway
-
A new, more verbose format has been added to Gateway. This adds more detail to each route allowing to view the predicates and filters associated to each route along with any configuration that is available.
/actuator/gateway/routes
[ +A new, more verbose format has been added to Gateway. This adds more detail to each route allowing to view the predicates and filters associated to each route along with any configuration that is available.
/actuator/gateway/routes[ { "predicate": "(Hosts: [**.addrequestheader.org] && Paths: [/headers], match trailing slash: true)", "route_id": "add_request_header_test", @@ -17,7 +17,7 @@ } ]To enable this feature, set the following property:
application.properties.
spring.cloud.gateway.actuator.verbose.enabled=true-
This will default to true in a future release.
To retrieve the global filters applied to all routes, make a
GETrequest to/actuator/gateway/globalfilters. The resulting response is similar to the following:{ +This will default to true in a future release.
To retrieve the global filters applied to all routes, make a
GETrequest to/actuator/gateway/globalfilters. The resulting response is similar to the following:{ "org.springframework.cloud.gateway.filter.LoadBalancerClientFilter@77856cc5": 10100, "org.springframework.cloud.gateway.filter.RouteToRequestUrlFilter@4f6fd101": 10000, "org.springframework.cloud.gateway.filter.NettyWriteResponseFilter@32d22650": -1, @@ -26,11 +26,11 @@ "org.springframework.cloud.gateway.filter.ForwardPathFilter@33a71d23": 0, "org.springframework.cloud.gateway.filter.AdaptCachedBodyGlobalFilter@135064ea": 2147483637, "org.springframework.cloud.gateway.filter.WebsocketRoutingFilter@23c05889": 2147483646 -}The response contains details of the global filters in place. For each global filter is provided the string representation of the filter object (e.g.,
org.springframework.cloud.gateway.filter.LoadBalancerClientFilter@77856cc5) and the corresponding order in the filter chain.To retrieve the GatewayFilter factories applied to routes, make a
GETrequest to/actuator/gateway/routefilters. The resulting response is similar to the following:{ +}The response contains details of the global filters in place. For each global filter is provided the string representation of the filter object (e.g.,
org.springframework.cloud.gateway.filter.LoadBalancerClientFilter@77856cc5) and the corresponding order in the filter chain.To retrieve the GatewayFilter factories applied to routes, make a
GETrequest to/actuator/gateway/routefilters. The resulting response is similar to the following:{ "[AddRequestHeaderGatewayFilterFactory@570ed9c configClass = AbstractNameValueGatewayFilterFactory.NameValueConfig]": null, "[SecureHeadersGatewayFilterFactory@fceab5d configClass = Object]": null, "[SaveSessionGatewayFilterFactory@4449b273 configClass = Object]": null -}The response contains details of the GatewayFilter factories applied to any particular route. For each factory is provided the string representation of the corresponding object (e.g.,
[SecureHeadersGatewayFilterFactory@fceab5d configClass = Object]). Note that thenullvalue is due to an incomplete implementation of the endpoint controller, for that it tries to set the order of the object in the filter chain, which does not apply to a GatewayFilter factory object.To clear the routes cache, make a
POSTrequest to/actuator/gateway/refresh. The request returns a 200 without response body.To retrieve the routes defined in the gateway, make a
GETrequest to/actuator/gateway/routes. The resulting response is similar to the following:[{ +}The response contains details of the GatewayFilter factories applied to any particular route. For each factory is provided the string representation of the corresponding object (e.g.,
[SecureHeadersGatewayFilterFactory@fceab5d configClass = Object]). Note that thenullvalue is due to an incomplete implementation of the endpoint controller, for that it tries to set the order of the object in the filter chain, which does not apply to a GatewayFilter factory object.To clear the routes cache, make a
POSTrequest to/actuator/gateway/refresh. The request returns a 200 without response body.To retrieve the routes defined in the gateway, make a
GETrequest to/actuator/gateway/routes. The resulting response is similar to the following:[{ "route_id": "first_route", "route_object": { "predicate": "org.springframework.cloud.gateway.handler.predicate.PathRoutePredicateFactory$$Lambda$432/1736826640@1e9d7e7d", @@ -47,7 +47,7 @@ "filters": [] }, "order": 0 -}]The response contains details of all the routes defined in the gateway. The following table describes the structure of each element (i.e., a route) of the response.
Path Type Description
route_idString
The route id.
route_object.predicateObject
The route predicate.
route_object.filtersArray
The GatewayFilter factories applied to the route.
orderNumber
The route order.
To retrieve information about a single route, make a
GETrequest to/actuator/gateway/routes/{id}(e.g.,/actuator/gateway/routes/first_route). The resulting response is similar to the following:{ +}]The response contains details of all the routes defined in the gateway. The following table describes the structure of each element (i.e., a route) of the response.
Path Type Description
route_idString
The route id.
route_object.predicateObject
The route predicate.
route_object.filtersArray
The GatewayFilter factories applied to the route.
orderNumber
The route order.
To retrieve information about a single route, make a
GETrequest to/actuator/gateway/routes/{id}(e.g.,/actuator/gateway/routes/first_route). The resulting response is similar to the following:{ "id": "first_route", "predicates": [{ "name": "Path", @@ -56,4 +56,4 @@ "filters": [], "uri": "https://www.uri-destination.org", "order": 0 -}]The following table describes the structure of the response.
Path Type Description
idString
The route id.
predicatesArray
The collection of route predicates. Each item defines the name and the arguments of a given predicate.
filtersArray
The collection of filters applied to the route.
uriString
The destination URI of the route.
orderNumber
The route order.
To create a route, make a
POSTrequest to/gateway/routes/{id_route_to_create}with a JSON body that specifies the fields of the route (see the previous subsection).To delete a route, make a
DELETErequest to/gateway/routes/{id_route_to_delete}.The table below summarises the Spring Cloud Gateway actuator endpoints. Note that each endpoint has
/actuator/gatewayas the base-path.
ID HTTP Method Description
globalfiltersGET
Displays the list of global filters applied to the routes.
routefiltersGET
Displays the list of GatewayFilter factories applied to a particular route.
refreshPOST
Clears the routes cache.
routesGET
Displays the list of routes defined in the gateway.
routes/{id}GET
Displays information about a particular route.
routes/{id}POST
Add a new route to the gateway.
routes/{id}DELETE
Remove an existing route from the gateway.
The following table describes the structure of the response.
| Path | Type | Description |
|---|---|---|
| String | The route id. |
| Array | The collection of route predicates. Each item defines the name and the arguments of a given predicate. |
| Array | The collection of filters applied to the route. |
| String | The destination URI of the route. |
| Number | The route order. |
To create a route, make a POST request to /gateway/routes/{id_route_to_create} with a JSON body that specifies the fields of the route (see the previous subsection).
To delete a route, make a DELETE request to /gateway/routes/{id_route_to_delete}.
The table below summarises the Spring Cloud Gateway actuator endpoints. Note that each endpoint has /actuator/gateway as the base-path.
| ID | HTTP Method | Description |
|---|---|---|
| GET | Displays the list of global filters applied to the routes. |
| GET | Displays the list of GatewayFilter factories applied to a particular route. |
| POST | Clears the routes cache. |
| GET | Displays the list of routes defined in the gateway. |
| GET | Displays information about a particular route. |
| POST | Add a new route to the gateway. |
| DELETE | Remove an existing route from the gateway. |