From d45983aa59570f2bbc22372b5a81b9b73d48dc6b Mon Sep 17 00:00:00 2001 From: Bart Koelman <104792814+bart-vmware@users.noreply.github.com> Date: Mon, 16 Jun 2025 17:02:55 +0200 Subject: [PATCH] Update docs for actuator changes from https://github.com/SteeltoeOSS/Steeltoe/pull/1520 --- docs/docs/v4/management/cloud-foundry.md | 66 ++++++++++++++++++++++++ docs/docs/v4/management/health.md | 14 ++--- docs/docs/v4/management/httpexchanges.md | 2 +- docs/docs/v4/management/hypermedia.md | 8 +-- 4 files changed, 78 insertions(+), 12 deletions(-) diff --git a/docs/docs/v4/management/cloud-foundry.md b/docs/docs/v4/management/cloud-foundry.md index ce831599..539d18e6 100644 --- a/docs/docs/v4/management/cloud-foundry.md +++ b/docs/docs/v4/management/cloud-foundry.md @@ -27,6 +27,10 @@ Each key must be prefixed with `Management:Endpoints:CloudFoundry`. | `ApplicationId` | The ID of the application used in permission checks | | | `CloudFoundryApi` | The URL of the Cloud Foundry API | | +> [!TIP] +> The preceding settings apply only to the `/cloudfoundryapplication` hypermedia endpoint. +> To turn off *all* management endpoints starting with this path, set `Management:CloudFoundry:Enabled` to `false`. + ## Enable HTTP Access The URL path to the endpoint is computed by combining the global `Management:Endpoints:Path` setting with the `Path` setting described in the preceding section. @@ -79,3 +83,65 @@ In addition, the endpoints may be secured by whatever security mechanism the app > [!CAUTION] > An authorization policy on `/actuator` also applies to `/cloudfoundryapplication`, which then breaks the integration with Apps Manager. > To prevent public access to `/actuator` when running on Cloud Foundry, consider configuring actuators to [use an alternate port](./using-endpoints.md#configure-global-settings). + +## Sample Output + +This endpoint returns a list of management endpoints, including itself. + +The response is always returned as JSON: + +```json +{ + "type": "steeltoe", + "_links": { + "beans": { + "href": "https://appname.cf-app.com/cloudfoundryapplication/beans", + "templated": false + }, + "dbmigrations": { + "href": "https://appname.cf-app.com/cloudfoundryapplication/dbmigrations", + "templated": false + }, + "env": { + "href": "https://appname.cf-app.com/cloudfoundryapplication/env", + "templated": false + }, + "health": { + "href": "https://appname.cf-app.com/cloudfoundryapplication/health", + "templated": true + }, + "heapdump": { + "href": "https://appname.cf-app.com/cloudfoundryapplication/heapdump", + "templated": false + }, + "httpexchanges": { + "href": "https://appname.cf-app.com/cloudfoundryapplication/httpexchanges", + "templated": false + }, + "info": { + "href": "https://appname.cf-app.com/cloudfoundryapplication/info", + "templated": false + }, + "loggers": { + "href": "https://appname.cf-app.com/cloudfoundryapplication/loggers", + "templated": true + }, + "mappings": { + "href": "https://appname.cf-app.com/cloudfoundryapplication/mappings", + "templated": false + }, + "refresh": { + "href": "https://appname.cf-app.com/cloudfoundryapplication/refresh", + "templated": false + }, + "threaddump": { + "href": "https://appname.cf-app.com/cloudfoundryapplication/threaddump", + "templated": false + }, + "self": { + "href": "https://appname.cf-app.com/cloudfoundryapplication", + "templated": false + } + } +} +``` diff --git a/docs/docs/v4/management/health.md b/docs/docs/v4/management/health.md index 0424f2e0..b2f44bb6 100644 --- a/docs/docs/v4/management/health.md +++ b/docs/docs/v4/management/health.md @@ -129,9 +129,6 @@ When `ShowComponents` and `ShowDetails` are set to `Always`, or when set to `Whe { "status": "UP", "components": { - "ping": { - "status": "UP" - }, "diskSpace": { "status": "UP", "details": { @@ -141,6 +138,9 @@ When `ShowComponents` and `ShowDetails` are set to `Always`, or when set to `Whe "path": "C:\\source\\Repository\\src\\Project", "exists": true } + }, + "ping": { + "status": "UP" } } } @@ -170,7 +170,7 @@ If you want to check application health based on a subset of health contributors } ``` -While group names are case-sensitive, the entries in `Include` are case-insensitive and activate only health contributors with a matching `Id`, and/or ASP.NET health check registrations with a matching name. +Group names and the entries in `Include` are case-insensitive and activate only health contributors with a matching `Id`, and/or ASP.NET health check registrations with a matching name. For any group that has been defined, you can access health information from the group by appending the group name to the HTTP request URL. For example: `/actuator/health/example-group`. @@ -348,9 +348,6 @@ When `ShowComponents` and `ShowDetails` are set to `Always`, or when set to `Whe "status": "WARNING", "description": "This health check does not check anything" }, - "ping": { - "status": "UP" - }, "diskSpace": { "status": "UP", "details": { @@ -360,6 +357,9 @@ When `ShowComponents` and `ShowDetails` are set to `Always`, or when set to `Whe "path": "C:\\source\\Repository\\src\\Project", "exists": true } + }, + "ping": { + "status": "UP" } } } diff --git a/docs/docs/v4/management/httpexchanges.md b/docs/docs/v4/management/httpexchanges.md index 7b470249..8a76ff3e 100644 --- a/docs/docs/v4/management/httpexchanges.md +++ b/docs/docs/v4/management/httpexchanges.md @@ -2,7 +2,7 @@ The Steeltoe HTTP Exchanges endpoint provides the ability to view the last several requests sent to your application. -When you activate this endpoint, an `IHttpExchangesRepository` implementation is registered, which stores HTTP request/response information in memory. This endpoint provides access to that information. +When you activate this endpoint, HTTP request/response information is captured and stored in memory. This endpoint provides access to that information. ## Configure Settings diff --git a/docs/docs/v4/management/hypermedia.md b/docs/docs/v4/management/hypermedia.md index 9f5e87da..67086fdc 100644 --- a/docs/docs/v4/management/hypermedia.md +++ b/docs/docs/v4/management/hypermedia.md @@ -71,12 +71,12 @@ The response is always returned as JSON: { "type": "steeltoe", "_links": { - "info": { - "href": "https://localhost:7105/actuator/info", - "templated": false - }, "health": { "href": "https://localhost:7105/actuator/health", + "templated": true + }, + "info": { + "href": "https://localhost:7105/actuator/info", "templated": false }, "self": {