spring-boot-actuator

Spring boot 2.1.3 remove extra 'details' field from health endpoint result

爷,独闯天下 提交于 2019-12-11 17:09:49
问题 I am porting my service from Spring 1.5 to 2.1.3 and I noticed that after making necessary changes my health endpoint which adds some custom data is returning the JSON with an extra 'details' tag. Is there any way to get rid of it? Spring 2.1.3 { "status": "UP", "details": { "diskSpace": { "status": "UP", "details": { "stats": [ { "status": "UP", "totalSpace": 64412954624 } ] } } } basic health endpoint without my change: { "status": "UP", "details": { "application": { "status": "UP" } } }

How to get Hystrix Dashboard working again in Spring Boot Admin 2.x

痴心易碎 提交于 2019-12-11 14:55:30
问题 Spring Boot Admin 1 has an integrated Hystrix Dashboard. After upgrading my stack from Spring Boot 1.x to 2.x; this dashboard seems to have disappeared. How can I re-enable it? 回答1: The official support for Hystrix Dashboard was dropped in Spring Boot Admin 2.x. There now exists an unofficial plugin for Spring Boot Admin 2.x that brings Hystrix Dashboard back to live. Add the following Maven dependency to your Spring Boot Admin application's pom.xml , rebuild and deploy. <dependency> <groupId

Actuator - custom logfile endpoint possible?

╄→гoц情女王★ 提交于 2019-12-11 14:39:09
问题 I have set up my log configuration using logback. The configuration sets up my logs in a rolling manner in a custom location. This means that I'm not using either: "logging.file" or "logging.path" in my application.yml configuration, and as a consequence, the logfile endpoint no longer works. Does anybody know of a way to customize this endpoint, so that I can point to the location/file specified in my logback.xml configuration? 回答1: Reading the two sections on Logging 26 & 74. It looks like

Spring boot 2 upgrade issue with actuator

二次信任 提交于 2019-12-11 08:07:16
问题 Config: springCloudVersion = 'Finchley.SR1' springBootVersion = '2.0.2.RELEASE' Getting below error: Caused by: java.lang.ClassNotFoundException: org.springframework.boot.actuate.metrics.CounterService There is no CounterService class in this release of spring-starter-actuator-2.0.2.RELEASE?? Ref: https://docs.spring.io/spring-boot/docs/2.0.2.RELEASE/api/ 回答1: Yes, CounterService is been removed in SpringBoot 2.0. We faced the same issue and we used MeterRegistry from micrometer instead of

Spring boot logging path

岁酱吖の 提交于 2019-12-11 08:07:11
问题 I have configured the logging path property in my spring boot application.properties. logging.path= logging.file= In respective of this property in application.properties. It is taking the logging file name and creating a new log file in tomcat log file directory.I checked my system properties it has set both LOG_FILE and LOG_PATH property. I have using 1.3.6 version of spring boot. Any known issue related to this. I have read one issue and it seems to be fixed long back. 回答1: You can only

Spring Boot v2.0.0.M2 webflux and actuator

那年仲夏 提交于 2019-12-11 06:35:41
问题 I'm not able to get Actuator work with Spring Boot v2.0.0.M2 and Netty . The following dependencies are used in the build.gradle : compile "org.springframework.boot:spring-boot-starter-actuator" compile "org.springframework.boot:spring-boot-starter-data-redis-reactive" compile "org.springframework.boot:spring-boot-starter-webflux" compile "org.springframework.boot:spring-boot-configuration-processor" runtime "org.springframework.boot:spring-boot-devtools" I don't see information related to

spring boot @refreshscope doesn't update datasource

孤人 提交于 2019-12-11 05:25:57
问题 I am trying to update DB datasource if the environment variable for DB.URL changes. Below is my class, @SpringBootApplication @ConfigurationProperties(value="myapp") public class MyApp { @Value("${myapp.db.url}") String databaseURL; @Value("${myapp.db.username}") String databaseUsername; @Value("${myapp.db.password}") String databasePassword; public static void main(String[] args) { SpringApplication.run(MyApp.class, args); } @Bean @RefreshScope @Primary public DataSource getDataSource() {

Actuator with Spring boot Jersey

旧时模样 提交于 2019-12-11 04:59:19
问题 I'm using Jersey starter in my web application. org.springframework.boot spring-boot-starter-jersey 1.4.2.RELEASE Trying to integrate the Actuator endpoints into my application.Used the following maven dependency org.springframework.boot spring-boot-starter-actuator 1.5.2.RELEASE org.springframework.boot spring-boot-starter-web 1.5.2.RELEASE When I access the health endpoint, it was giving me 404 error. http://localhost:8080/context/health Do I need to add any other configuration class to my

Spring Boot : Count Page Views - Actuators

邮差的信 提交于 2019-12-11 04:30:03
问题 I have a requirement to count the views on each endpoint. The idea is to create one common Request Count Mapping for all endpoints which should return the view count based on a dynamically entred endpoint. Let's say someone wants to check the view counts on http://localhost:8080/user/101 . RequestMappping path = /admin/count & RequestParam = url (Here /user/101) Then create the dynamic Request based on RequestParam http://localhost:8080/actuator/metrics/http.server.requests?tag=uri:/user/101

How can I get the current number of client request threads in spring boot embedded tomcat?

China☆狼群 提交于 2019-12-11 01:47:05
问题 I'd like to get the current number of active client request threads in a spring boot app using embedded tomcat so that I can expose it over actuator's metrics endpoint. I'm not looking for active sessions, but active request processing threads. Preferably, I'd like to get this data per connector as well. Does anyone have any ideas on a good way to get at this information in spring boot? 回答1: I don't know if this is what you are looking for, but you can get serveral values like that via JMX.