Skip to content

Commit

Permalink
doc(howTo.pages.actuator): add notes
Browse files Browse the repository at this point in the history
  • Loading branch information
alfredo-toledano committed Jul 2, 2024
1 parent 0fafb8d commit ad47447
Showing 1 changed file with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
[[howto.actuator]]
= Actuator

Spring Boot includes the Spring Boot Actuator.
This section answers questions that often arise from its use.

Spring Boot Actuator


[[howto.actuator.change-http-port-or-address]]
== Change the HTTP Port or Address of the Actuator Endpoints

In a standalone application, the Actuator HTTP port defaults to the same as the main HTTP port.
To make the application listen on a different port, set the external property: configprop:management.server.port[].
To listen on a completely different network address (such as when you have an internal network for management and an external one for user applications), you can also set `management.server.address` to a valid IP address to which the server is able to bind.

For more detail, see the xref:api:java/org/springframework/boot/actuate/autoconfigure/web/server/ManagementServerProperties.html[`ManagementServerProperties`] source code and xref:reference:actuator/monitoring.adoc#actuator.monitoring.customizing-management-server-port[Customizing the Management Server Port] in the "`Production-Ready Features`" section.

* if standalone application -> Actuator
** HTTP port (defaults) == main HTTP port
** if you want different HTTP port -> set `management.server.port`
** if you want different network address -> set `management.server.address=validIPAddressToWhichServerCanBind`
** Check
*** xref:api:java/org/springframework/boot/actuate/autoconfigure/web/server/ManagementServerProperties.html[`ManagementServerProperties`] source code
*** xref:reference:actuator/monitoring.adoc#actuator.monitoring.customizing-management-server-port[Customizing the Management Server Port] in the "`Production-Ready Features`" section


[[howto.actuator.customize-whitelabel-error-page]]
== Customize the '`whitelabel`' Error Page

* TODO:
Spring Boot installs a '`whitelabel`' error page that you see in a browser client if you encounter a server error (machine clients consuming JSON and other media types should see a sensible response with the right error code).

NOTE: Set `server.error.whitelabel.enabled=false` to switch the default error page off.
Expand Down

0 comments on commit ad47447

Please sign in to comment.