spring-boot-actuator

Metrics Collection for Spring Boot REST APIs

岁酱吖の 提交于 2019-11-28 01:47:07
问题 I am trying to collect metrics for my Spring Boot(2.1.0.RELEASE) Application. Specifically, I want to know No of times individual REST endpoints were called. Time taken by each of those endpoints to process the request. Average rate at which my requests are being processed/errored. The actuator /actuator/metrics endpoint gives lot of info but I am not sure if any of those are useful for my case. Also, can someone tell if @Timed(or any other out-of-the-box annotation) can be used for achieving

How to add a custom health check in spring boot health?

∥☆過路亽.° 提交于 2019-11-27 13:37:24
问题 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency> This will add several useful endpoints to your application. One of them is /health. When you start your application and navigate to the /health endpoint you will see it returns already some data. { "status":"UP", "diskSpace": { "status":"UP", "free":56443746, "threshold":1345660 } } How to add a custom health check in spring boot health? 回答1: Adding a custom health

Spring Boot 2 - Actuator Metrics Endpoint not working

£可爱£侵袭症+ 提交于 2019-11-27 12:16:43
问题 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? 回答1: 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

Configure Spring Boot with two ports

怎甘沉沦 提交于 2019-11-27 05:06:48
I'm trying configure an application in Spring Boot with two differents ports, but I haven't got still. My first aproximation has been with two controllers and I have defined a @Bean inside the two controller with container.setPort(8080); And my second aproximation has been add the actuator dependency and change the port of the managament, but my application don't run. "Address already in use: bind", How can I confiure an application with two ports? I want one port for admin and the other port is for consults of my api. As is has been mentioned before, server.port and management.port along with

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

旧街凉风 提交于 2019-11-27 02:50:36
问题 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

Configure Spring Boot with two ports

╄→尐↘猪︶ㄣ 提交于 2019-11-26 11:27:38
问题 I\'m trying configure an application in Spring Boot with two differents ports, but I haven\'t got still. My first aproximation has been with two controllers and I have defined a @Bean inside the two controller with container.setPort(8080); And my second aproximation has been add the actuator dependency and change the port of the managament, but my application don\'t run. \"Address already in use: bind\", How can I confiure an application with two ports? I want one port for admin and the other