spring-boot-actuator

Prometheus config doesn't work with Spring boot 2.3.0: ClassNotFoundException: io.micrometer.prometheus.HistogramFlavor

≡放荡痞女 提交于 2020-06-17 00:09:05
问题 Application was working correctly with version 2.2.6 but as the application is upgraded to latest version of spring boot 2.3.0 it stopped working and fails during startup. 2020-05-20T08:43:04.408+01:00 [APP/PROC/WEB/0] [OUT] 2020-05-20 07:43:04.407 ERROR 15 --- [ main] o.s.b.web.embedded.tomcat.TomcatStarter : Error starting Tomcat context. Exception: org.springframework.beans.factory.UnsatisfiedDependencyException. Message: Error creating bean with name 'webMvcMetricsFilter' defined in class

Prometheus config doesn't work with Spring boot 2.3.0: ClassNotFoundException: io.micrometer.prometheus.HistogramFlavor

限于喜欢 提交于 2020-06-17 00:08:38
问题 Application was working correctly with version 2.2.6 but as the application is upgraded to latest version of spring boot 2.3.0 it stopped working and fails during startup. 2020-05-20T08:43:04.408+01:00 [APP/PROC/WEB/0] [OUT] 2020-05-20 07:43:04.407 ERROR 15 --- [ main] o.s.b.web.embedded.tomcat.TomcatStarter : Error starting Tomcat context. Exception: org.springframework.beans.factory.UnsatisfiedDependencyException. Message: Error creating bean with name 'webMvcMetricsFilter' defined in class

Spring boot actuator “/health” is not working

☆樱花仙子☆ 提交于 2020-06-14 04:34:07
问题 I have a running Springboot application which serves the URL http://localhost:8081/topics and returns me JSON response as expected. I added actuator dependency <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> <scope>test</scope> </dependency> as suggested in tutorial But when I hit http://localhost:8081/health it does not give expected result. It says { "timestamp": 1497952368055, "status": 404, "error": "Not Found", "message": "No

Protect Actuator endpoints with user/password while granting public access for RestControllers

南楼画角 提交于 2020-05-28 03:35:45
问题 I updated an already existing application from Spring Boot 1.3 to 2.0.1. This application makes use of the Actuator and exposes a REST-style API. In Boot 1.3 the API could be used without authentication and the actuator endpoint was configured to be password protected: security.user.name=foo security.user.password=bar security-user.role=ADMIN I updated this like documented in the configuration changelog and renamed the entries from security.user.name to spring.security.user.name and alike.

Protect Actuator endpoints with user/password while granting public access for RestControllers

梦想与她 提交于 2020-05-28 03:34:07
问题 I updated an already existing application from Spring Boot 1.3 to 2.0.1. This application makes use of the Actuator and exposes a REST-style API. In Boot 1.3 the API could be used without authentication and the actuator endpoint was configured to be password protected: security.user.name=foo security.user.password=bar security-user.role=ADMIN I updated this like documented in the configuration changelog and renamed the entries from security.user.name to spring.security.user.name and alike.

How to enable all endpoints in actuator (Spring Boot 2.0.0 RC1)

懵懂的女人 提交于 2020-05-24 09:39:43
问题 I moved to Spring Boot 2.0.0 RC1 from 1.5.10 and I am stuck with actuator in the latest version. How can I enable expose and enable all actuator endpoints? The only endpoints that get exposed are: { "_links": { "self": { "href": "http://127.0.0.1:8080/actuator", "templated": false }, "health": { "href": "http://127.0.0.1:8080/actuator/health", "templated": false }, "info": { "href": "http://127.0.0.1:8080/actuator/info", "templated": false } } } This is my application.properties files. Any

How to stop a FixedRateScheduledTask in Spring without interrupting a running thread

☆樱花仙子☆ 提交于 2020-05-17 07:07:19
问题 In my SpringBoot application, I have a FixedRateScheduledTask. I want to dynamically change the fixed interval upon a refresh event. Note that depending on the processing time, there could be several parallel threads, thanks to Async. Upon a refresh event, I cancel ed the current ScheduledTask and re-added a new FixedRateTask with new value for interval . Below is my code @Configuration @EnableAsync @EnableScheduling public class Scheduler implements SchedulingConfigurer, ApplicationListener

How to stop a FixedRateScheduledTask in Spring without interrupting a running thread

梦想与她 提交于 2020-05-17 07:07:09
问题 In my SpringBoot application, I have a FixedRateScheduledTask. I want to dynamically change the fixed interval upon a refresh event. Note that depending on the processing time, there could be several parallel threads, thanks to Async. Upon a refresh event, I cancel ed the current ScheduledTask and re-added a new FixedRateTask with new value for interval . Below is my code @Configuration @EnableAsync @EnableScheduling public class Scheduler implements SchedulingConfigurer, ApplicationListener

Actuator /metrics endpoint does not include http.server.requests

牧云@^-^@ 提交于 2020-05-16 05:39:48
问题 According to the documentation of the spring boot actuator Auto-configuration enables the instrumentation of requests handled by Spring MVC. When management.metrics.web.server.auto-time-requests is true, this instrumentation occurs for all requests. Alternatively, when set to false, you can enable instrumentation by adding @Timed And By default, metrics are generated with the name, http.server.requests When I access the /metrics endpoint I am getting { "mem": 405105, "mem.free": 150352,

How to expose kafka metrics to /actuator/metrics with spring boot 2

匆匆过客 提交于 2020-05-14 18:13:48
问题 I was looking a while and didn't seem to find the answer. I'm using Spring boot 2, Spring Kafka 2.1.4 and I want to see the kafka consumer metrics in the /metrics endpoint of spring boot actuator. What I don't understand is - should I implenemt the exposure myself or is this comes out-of-box in boot 2 ? If I to implement this my self, what is the best way to do it? 回答1: Targeted for micrometer v1.1.0 is the KafkaConsumerMetrics implementation of MeterBinder . This should expose the kafka