spring-boot-actuator

Spring Boot Actuator - MAX property

依然范特西╮ 提交于 2019-12-02 11:43:34
I am using Spring Boot Actuator dependency to get insights of application. For that, I have used Spring Boot Admin. Configuration for client-server is working fine. I have to measure the count, total-time, max for endpoints which are going to execute. uri:/user/asset/getAllAssets TOTAL_TIME: 831ms MAX: 0ms uri:/user/getEmployee/{employeeId} TOTAL_TIME: 98ms MAX: 0ms Why MAX (time) is 0 while TOTAL_TIME: is Xms While I execute generalize form localhost:8889/actuator/metrics/http.server.requests I get the MAX as 3.00.. I had also seen production-ready-features but not able to find any

Setting Spring boot actuator with oAuth2 in the Authorisation server

烂漫一生 提交于 2019-12-02 02:08:47
问题 I have two spring boot server applications (Spring boot 1.5.2), the first one is the resource server and the second is the authorisation server (oAuth2), I have added Spring boot actuator to both servers and configured both with the following properties: management.security.roles=ROLE_MYADMINROLE management.context-path=/myactuator In the resource server, I can access the actuator endpoints using a token obtained from the authorisation server for a user who hold the role ROLE_MYADMINROLE .

Get Spring Boot management port at runtime when management.port=0

本秂侑毒 提交于 2019-11-30 23:05:37
I'm looking for advice on how to get the port that was assigned to the embedded tomcat that is serving the actuator endpoint when setting management.port property to 0 in integration tests. Im using Spring Boot 1.3.2 with the following application.yml configuration: server.port: 8080 server.contextPath: /my-app-context-path management.port: 8081 management.context-path: /manage ... my integration tests are then annotated with @WebIntegrationTest , setting the ports shown above to 0 @WebIntegrationTest({ "server.port=0", "management.port=0" }) and the following utility class should be used to

Get Spring Boot management port at runtime when management.port=0

不羁岁月 提交于 2019-11-30 18:13:08
问题 I'm looking for advice on how to get the port that was assigned to the embedded tomcat that is serving the actuator endpoint when setting management.port property to 0 in integration tests. Im using Spring Boot 1.3.2 with the following application.yml configuration: server.port: 8080 server.contextPath: /my-app-context-path management.port: 8081 management.context-path: /manage ... my integration tests are then annotated with @WebIntegrationTest , setting the ports shown above to 0

actuator /refresh is not being provided in SpringBoot 2.0.1

被刻印的时光 ゝ 提交于 2019-11-30 07:16:11
问题 I am creating a demo project for Spring-Config-Server and Spring-Config-Client . In SpringBoot 1.5.6.RELEASE everything is working fine. However, when I am upgrading project to 2.0.1.RELEASE it does not provide the actuator endpoints. Actuator endpoint provided in 1.5.6.RELEASE Mapped "{[/refresh || /refresh.json],methods=[POST]}" Mapped "{[/dump || /dump.json],methods=[GET] Mapped "{[/heapdump || /heapdump.json],methods=[GET] Mapped "{[/autoconfig || /autoconfig.json],methods=[GET] Mapped "{

Spring boot add new schedule job dynamically

Deadly 提交于 2019-11-30 07:02:50
I am writing a Spring Boot App My requirements are - In the resources (src/main/resources) folder if I add new xml files.. I should read those files and get some url and other specific settings from each of it. and for those urls I need to download data everyday .. So a new scheduler job will start with url and some settings The new jobs will run in different schedule time which will use cron expression present in the xml files Also files will be added dynamically at any point of time How to implenet it . If you want to dynamically schedule tasks you can do it without spring by using

actuator /refresh is not being provided in SpringBoot 2.0.1

放肆的年华 提交于 2019-11-29 02:34:56
I am creating a demo project for Spring-Config-Server and Spring-Config-Client . In SpringBoot 1.5.6.RELEASE everything is working fine. However, when I am upgrading project to 2.0.1.RELEASE it does not provide the actuator endpoints. Actuator endpoint provided in 1.5.6.RELEASE Mapped "{[/refresh || /refresh.json],methods=[POST]}" Mapped "{[/dump || /dump.json],methods=[GET] Mapped "{[/heapdump || /heapdump.json],methods=[GET] Mapped "{[/autoconfig || /autoconfig.json],methods=[GET] Mapped "{[/resume || /resume.json],methods=[POST]}" Mapped "{[/configprops || /configprops.json],methods=[GET]

Spring boot add new schedule job dynamically

烈酒焚心 提交于 2019-11-29 00:53:21
问题 I am writing a Spring Boot App My requirements are - In the resources (src/main/resources) folder if I add new xml files.. I should read those files and get some url and other specific settings from each of it. and for those urls I need to download data everyday .. So a new scheduler job will start with url and some settings The new jobs will run in different schedule time which will use cron expression present in the xml files Also files will be added dynamically at any point of time How to

Spring Boot 2 - Actuator Metrics Endpoint not working

*爱你&永不变心* 提交于 2019-11-28 20:32:59
In my Spring Boot App (2.0.0.M7) application.properties I set management.endpoint.metrics.enabled=true However, when i hit localhost:8080/actuator/metrics I get 404. Whats the solution? senseiwu I would like to enhance the OP's answer with more information as I struggled a bit before finally stumbling upon this solution and there seem to be lots of confusion about changes to actuator behavior with Spring Boot 2 What hasn't changed You need to include a dependency to spring-boot-starter-actuator <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot

Exporting Spring Boot Actuator Metrics (& Dropwizard Metrics) to Statsd

…衆ロ難τιáo~ 提交于 2019-11-28 09:18:10
I'm trying to export all of the metrics which are visible at the endpoint /metrics to a StatsdMetricWriter . I've got the following configuration class so far: package com.tonyghita.metricsdriven.service.config; import com.codahale.metrics.MetricRegistry; import com.ryantenney.metrics.spring.config.annotation.EnableMetrics; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.actuate.autoconfigure.ExportMetricReader; import org