spring-boot-actuator

Serving a Spring Boot Actuator endpoint on multiple ports

纵然是瞬间 提交于 2019-12-22 12:15:17
问题 Our main application is being served on port 8443, and we're using management.port to serve our actuator endpoints on port 8444. Is there a way to get a single endpoint (the health endpoint) to serve on both 8443 and 8444 while leaving the remaining endpoints on port 8444 only? 回答1: Providing you're using the built in Tomcat container you could: Remove the management port config property Add an additional connector to serve port 8444 Add a filter to allow only the health check be accessed on

Spring-Boot-Admin is not loading the Admin page & UI is loaded for login page

浪子不回头ぞ 提交于 2019-12-20 06:26:42
问题 I need help with Spring Boot Admin with version Spring Boot 1.5 Problem: I fallowed the steps provided in github to create Spring Boot Admin App And I applied the @EnableAdminServer annotation to my Startup class I can see the login page loading but the styles are not loading and once i hit the login button after entering the username and password it's not redirecting to Spring Boot Admin home page. Dependencies used are below: <dependencies> <dependency> <groupId>org.springframework.boot<

How to make the `@Endpoint(id = “health”)` working in Spring Boot 2.0?

不问归期 提交于 2019-12-20 01:37:36
问题 I have tried the new way of customizing the health Actuator in Spring Boot 2.0.0.M5, as described here: https://spring.io/blog/2017/08/22/introducing-actuator-endpoints-in-spring-boot-2-0: @Endpoint(id = "health") public class HealthEndpoint { @ReadOperation public Health health() { return new Health.Builder() .up() .withDetail("MyStatus", "is happy") .build(); } } However, when I run HTTP GET to localhost:port/application/health , I still get the standard default health info. My code is

How to include JSON response body in Spring Boot Actuator's Trace?

限于喜欢 提交于 2019-12-18 04:34:13
问题 Spring Boot Actuator's Trace does a good job of capturing input/output HTTP params, headers, users, etc. I'd like to expand it to also capture the body of the HTTP response, that way I can have a full view of what is coming in and going out of the the web layer. Looking at the TraceProperties , doesn't look like there is a way to configure response body capturing. Is there a "safe" way to capture the response body without messing up whatever character stream it is sending back? 回答1: Recently,

How avoid the certificate validation in spring-boot-admin?

夙愿已清 提交于 2019-12-12 19:14:14
问题 In what way can I avoid certificate validation in spring-boot-admin? Link error image: https://ibb.co/fkZu8y I configure the RestTemplate for avoid the certificate in a class, but I do not know how to send it, I guess it must be in the client, the spring-boot-admin-starter-client works automatically. This is the code for avoid the certificate validation. public class SSLUtil { public RestTemplate getRestTemplate() throws KeyStoreException, NoSuchAlgorithmException, KeyManagementException {

How to make Spring Boot v2.0.0.M7 Actuator's shutdown work?

久未见 提交于 2019-12-12 10:50:34
问题 I created hello world Spring Boot v2.0.0.M7 app, added actuator, enabled shutdown and it isn't working. application.properties server.port=8082 endpoint.shutdown.enabled=true endpoint.shutdown.sensitive=false health works fine but not the shutdown What am I doing wrong? 回答1: Endpoints have changed quite a bit in Spring Boot 2.0 and, as a result, your configuration is out of date. You need to enable the endpoint and also expose it over HTTP: management.endpoints.web.expose=* management

spring-cloud-starter-config POST /env not working

与世无争的帅哥 提交于 2019-12-12 10:07:04
问题 I have a little spring boot web application (executable jar) which has some custom properties inside the application.properties file. My goal is to be able to dynamically alter these properties at runtime without having to run a build/deploy or restarting the java process. The spring-cloud-starter-config project seems to be well suited for this (even though I am not using a config server) but I ran into the following problem: In my pom.xml I include dependencies to spring-boot-starter

Accessing localhost:8080/actuator endpoint (with spring boot actuator)

冷暖自知 提交于 2019-12-12 04:46:14
问题 In spring docs I have read about endpoint named "actuator" which is provided by actuator dependency, but I haven't managed to access it on my local testing app. Question: Does someone know how to access that endpoint? of coarse if it is possible :) Sub-question 1: If this endpoint exists, then why it is hidden? Sub-question 2: If this endpoint doesn't exist, how can we notify spring.io to correct documentation page (open some kind of ticket) ? Details: I want to access exactly "actuator"

Does having spring-boot-actuator changes the context root of the spring application?

不打扰是莪最后的温柔 提交于 2019-12-12 04:44:00
问题 According to this post, by having the spring-boot-actuator dependency in pom.xml , I could benefits from the actuator endpoints. However, I observed it breaks my existing my spring application (It is not a spring-boot application). I added the following to my dependency in pom.xml <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-actuator</artifactId> <version>1.2.5.RELEASE</version> </dependency> Thats it. I did not make any changes to application yet. I

Java Spring Boot Actuator Metrics system load average returning -1

时间秒杀一切 提交于 2019-12-12 03:43:20
问题 I am a new user to Spring Boot Actuator Metrics, I need to determine the CPU utilization of the system. The /metrics url does give me rest of the details, however the systemload.average returns -1 (if load average is not available -1 is returned). Could you let me know where I went wrong and how do I correct it? I am using maven and Eclipse IDE (Mars). I am accessing metric details on localhost itself. the url is http://localhost:8080/details/metrics (details used for context path) Here is my