Java 类org.springframework.boot.actuate.health.Health.Builder 实例源码

项目:spring-rabbitmq-actuator    文件:RabbitQueueCheckHealthIndicatorTest.java   
@Test
public void testDoHealthCheckSingleQueueCheckMetricException() throws Exception
{
    Queue queue = generateQueue("test");
    healthIndicator.addQueueCheck(queue, 10000, 2);

    propertiesManager.request(queue);
    PowerMock.expectLastCall().andThrow(new RuntimeException());

    PowerMock.replayAll();
    Builder builder = new Builder(Status.OUT_OF_SERVICE);
    healthIndicator.doHealthCheck(builder);
    PowerMock.verifyAll();

    Health health = builder.build();
    Assert.assertEquals(Status.DOWN, health.getStatus());
    Assert.assertNull(health.getDetails().get("test"));
}
项目:spring-cloud-vault    文件:VaultHealthIndicator.java   
@Override
public Health health() {

    try {

        VaultHealth vaultHealthResponse = vaultOperations.opsForSys().health();

        Builder healthBuilder = getHealthBuilder(vaultHealthResponse);

        if (StringUtils.hasText(vaultHealthResponse.getVersion())) {
            healthBuilder = healthBuilder.withDetail("version",
                    vaultHealthResponse.getVersion());
        }

        return healthBuilder.build();
    }
    catch (Exception e) {
        return Health.down(e).build();
    }
}
项目:spring-cloud-vault    文件:VaultHealthIndicator.java   
private Builder getHealthBuilder(VaultHealth vaultHealthResponse) {

        if (!vaultHealthResponse.isInitialized()) {
            return Health.down().withDetail("state", "Vault uninitialized");
        }

        if (vaultHealthResponse.isSealed()) {
            return Health.down().withDetail("state", "Vault sealed");
        }

        if (vaultHealthResponse.isStandby()) {
            return Health.up().withDetail("state", "Vault in standby");
        }

        return Health.up();
    }
项目:sample-boot-hibernate    文件:ApplicationConfig.java   
/** 営業日チェック */
@Bean
@ConditionalOnBean(BusinessDayHandler.class)
HealthIndicator dayIndicator(final Timestamper time, final BusinessDayHandler day) {
    return new AbstractHealthIndicator() {
        @Override
        protected void doHealthCheck(Builder builder) throws Exception {
            builder.up();
            builder.withDetail("day", day.day())
                    .withDetail("dayMinus1", day.day(-1))
                    .withDetail("dayPlus1", day.day(1))
                    .withDetail("dayPlus2", day.day(2))
                    .withDetail("dayPlus3", day.day(3));
        }
    };
}
项目:spring-cloud-commons    文件:RefreshScopeHealthIndicator.java   
@Override
protected void doHealthCheck(Builder builder) throws Exception {
    Map<String, Exception> errors = new HashMap<>(this.scope.getIfAvailable().getErrors());
    errors.putAll(this.rebinder.getErrors());
    if (errors.isEmpty()) {
        builder.up();
    }
    else {
        builder.down();
        if (errors.size() == 1) {
            builder.withException(errors.values().iterator().next());
        }
        else {
            for (String name : errors.keySet()) {
                builder.withDetail(name, errors.get(name));
            }
        }
    }
}
项目:spring-cloud-netflix    文件:HystrixHealthIndicator.java   
@Override
protected void doHealthCheck(Builder builder) throws Exception {
    List<String> openCircuitBreakers = new ArrayList<>();

    // Collect all open circuit breakers from Hystrix
    for (HystrixCommandMetrics metrics : HystrixCommandMetrics.getInstances()) {
        HystrixCircuitBreaker circuitBreaker = HystrixCircuitBreaker.Factory
                .getInstance(metrics.getCommandKey());
        if (circuitBreaker != null && circuitBreaker.isOpen()) {
            openCircuitBreakers.add(metrics.getCommandGroup().name() + "::"
                    + metrics.getCommandKey().name());
        }
    }

    // If there is at least one open circuit report OUT_OF_SERVICE adding the command
    // group
    // and key name
    if (!openCircuitBreakers.isEmpty()) {
        builder.status(CIRCUIT_OPEN).withDetail("openCircuitBreakers",
                openCircuitBreakers);
    }
    else {
        builder.up();
    }
}
项目:spring-cloud-config    文件:ConfigServerHealthIndicator.java   
@Override
  protected void doHealthCheck(Builder builder) throws Exception {
PropertySource<?> propertySource = getPropertySource();
builder.up();
if (propertySource instanceof CompositePropertySource) {
    List<String> sources = new ArrayList<>();
    for (PropertySource<?> ps : ((CompositePropertySource) propertySource).getPropertySources()) {
        sources.add(ps.getName());
    }
    builder.withDetail("propertySources", sources);
} else if (propertySource!=null) {
    builder.withDetail("propertySources", propertySource.toString());
} else {
    builder.unknown().withDetail("error", "no property sources located");
}
  }
项目:sagan    文件:ElasticsearchHealthIndicator.java   
@Override
protected void doHealthCheck(Builder builder) throws Exception {

    JestResult result = jestClient.execute(new Stats.Builder().addIndex(this.indices).build());
    JsonObject map = result.getJsonObject();

    if (result.isSucceeded()) {
        builder.up();
        for (String indexName : this.indices) {
            fillStatsForIndex(indexName, map, builder);
        }
    }
    else {
        builder.down();
    }
}
项目:sample-boot-micro    文件:MicroAppConfig.java   
/** 営業日チェック */
@Bean
HealthIndicator dayIndicator(final Timestamper time, final BusinessDayHandler day) {
    return new AbstractHealthIndicator() {
        @Override
        protected void doHealthCheck(Builder builder) throws Exception {
            builder.up();
            builder.withDetail("day", day.day())
                    .withDetail("dayMinus1", day.day(-1))
                    .withDetail("dayPlus1", day.day(1))
                    .withDetail("dayPlus2", day.day(2))
                    .withDetail("dayPlus3", day.day(3));
        }
    };
}
项目:sample-boot-micro    文件:MicroAssetConfig.java   
/** 営業日チェック */
@Bean
HealthIndicator dayIndicator(final Timestamper time, final BusinessDayHandler day) {
    return new AbstractHealthIndicator() {
        @Override
        protected void doHealthCheck(Builder builder) throws Exception {
            builder.up();
            builder.withDetail("day", day.day())
                    .withDetail("dayMinus1", day.day(-1))
                    .withDetail("dayPlus1", day.day(1))
                    .withDetail("dayPlus2", day.day(2))
                    .withDetail("dayPlus3", day.day(3));
        }
    };
}
项目:springboot-security-mongodb    文件:CustomHealthIndicator.java   
@Override
protected void doHealthCheck(Builder builder) throws Exception {
    int errorCode = new Random().nextInt(2);
    log.info("*************************** errorCode: {}", errorCode);
    if (errorCode != 0) {
        builder.down().withDetail("errorCode", errorCode).build();
    } else {
        builder.up();
    }
}
项目:lemonaid    文件:LocationHealthIndicator.java   
@Override
protected void doHealthCheck(Builder builder) throws Exception {
    log.info("Test geolocation service health - start.");
    long startTime = System.currentTimeMillis();
    Mentor mentor = mentorRepository.findAll().iterator().next();
    Point point = mentorUtils.getLocationOfMentor(mentor);
    if (point.getLatitude() != 0) {
        builder.withDetail("handle", point.toString()).up();
    } else {
        builder.status("GeocodingError");
    }
    log.info("Test geolocation service health - end. Duration: " + Long.toString(System.currentTimeMillis() - startTime) + "ms");
}
项目:lemonaid    文件:TwitterHealthIndicator.java   
@Override
protected void doHealthCheck(Builder builder) throws Exception {
    if (twitter.isAuthenticated()) {
        builder.withDetail("handle", twitter.getScreenName()).up();
    } else {
        builder.status("NotAuthenticated");
    }
}
项目:spring-rabbitmq-actuator    文件:RabbitQueueCheckHealthIndicatorTest.java   
@Test
public void testDoHealthCheckNoQueueChecks() throws Exception
{
    Builder builder = new Builder(Status.OUT_OF_SERVICE);
    healthIndicator.doHealthCheck(builder);
    Assert.assertEquals(Status.UP, builder.build().getStatus());
}
项目:spring-rabbitmq-actuator    文件:RabbitQueueCheckHealthIndicatorTest.java   
@SuppressWarnings({ "unchecked", "boxing" })
@Test
public void testDoHealthCheckSingleQueueCheckUp() throws Exception
{
    Queue queue = generateQueue("test");
    healthIndicator.addQueueCheck(queue, 10000, 2);

    RabbitQueueProperties properties = new RabbitQueueProperties();
    properties.setConsumerCount(4);
    properties.setMessageCount(5883);
    propertiesManager.request(queue);
    PowerMock.expectLastCall().andReturn(properties);

    PowerMock.replayAll();
    Builder builder = new Builder(Status.OUT_OF_SERVICE);
    healthIndicator.doHealthCheck(builder);
    PowerMock.verifyAll();

    Health health = builder.build();
    Assert.assertEquals(Status.UP, health.getStatus());
    Assert.assertNotNull(health.getDetails().get("test"));
    Map<String, Object> details = (Map<String, Object>) health.getDetails().get("test");
    Assert.assertEquals(Status.UP.getCode(), details.get("status"));
    Assert.assertEquals(5883, details.get("currentMessageCount"));
    Assert.assertEquals(10000, details.get("maxMessageCount"));
    Assert.assertEquals(4, details.get("currentConsumerCount"));
    Assert.assertEquals(2, details.get("minConsumerCount"));
}
项目:spring-rabbitmq-actuator    文件:RabbitQueueCheckHealthIndicatorTest.java   
@SuppressWarnings({ "unchecked", "boxing" })
@Test
public void testDoHealthCheckSingleQueueCheckQueueSizeDown() throws Exception
{
    Queue queue = generateQueue("test");
    healthIndicator.addQueueCheck(queue, 10000, 2);

    RabbitQueueProperties properties = new RabbitQueueProperties();
    properties.setConsumerCount(4);
    properties.setMessageCount(15883);
    propertiesManager.request(queue);
    PowerMock.expectLastCall().andReturn(properties);

    PowerMock.replayAll();
    Builder builder = new Builder(Status.OUT_OF_SERVICE);
    healthIndicator.doHealthCheck(builder);
    PowerMock.verifyAll();

    Health health = builder.build();
    Assert.assertEquals(Status.DOWN, health.getStatus());
    Assert.assertNotNull(health.getDetails().get("test"));
    Map<String, Object> details = (Map<String, Object>) health.getDetails().get("test");
    Assert.assertEquals(Status.DOWN.getCode(), details.get("status"));
    Assert.assertEquals(15883, details.get("currentMessageCount"));
    Assert.assertEquals(10000, details.get("maxMessageCount"));
    Assert.assertEquals(4, details.get("currentConsumerCount"));
    Assert.assertEquals(2, details.get("minConsumerCount"));
}
项目:spring-rabbitmq-actuator    文件:RabbitQueueCheckHealthIndicatorTest.java   
@SuppressWarnings({ "unchecked", "boxing" })
@Test
public void testDoHealthCheckSingleQueueCheckConsumerDown() throws Exception
{
    Queue queue = generateQueue("test");
    healthIndicator.addQueueCheck(queue, 10000, 2);

    RabbitQueueProperties properties = new RabbitQueueProperties();
    properties.setConsumerCount(1);
    properties.setMessageCount(5883);
    propertiesManager.request(queue);
    PowerMock.expectLastCall().andReturn(properties);

    PowerMock.replayAll();
    Builder builder = new Builder(Status.OUT_OF_SERVICE);
    healthIndicator.doHealthCheck(builder);
    PowerMock.verifyAll();

    Health health = builder.build();
    Assert.assertEquals(Status.DOWN, health.getStatus());
    Assert.assertNotNull(health.getDetails().get("test"));
    Map<String, Object> details = (Map<String, Object>) health.getDetails().get("test");
    Assert.assertEquals(Status.DOWN.getCode(), details.get("status"));
    Assert.assertEquals(5883, details.get("currentMessageCount"));
    Assert.assertEquals(10000, details.get("maxMessageCount"));
    Assert.assertEquals(1, details.get("currentConsumerCount"));
    Assert.assertEquals(2, details.get("minConsumerCount"));
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:MailHealthIndicator.java   
@Override
protected void doHealthCheck(Builder builder) throws Exception {
    builder.withDetail("location",
            this.mailSender.getHost() + ":" + this.mailSender.getPort());
    this.mailSender.testConnection();
    builder.up();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:AbstractHealthIndicator.java   
@Override
public final Health health() {
    Health.Builder builder = new Health.Builder();
    try {
        doHealthCheck(builder);
    }
    catch (Exception ex) {
        builder.down(ex);
    }
    return builder.build();
}
项目:spring-boot-concourse    文件:MailHealthIndicator.java   
@Override
protected void doHealthCheck(Builder builder) throws Exception {
    builder.withDetail("location",
            this.mailSender.getHost() + ":" + this.mailSender.getPort());
    this.mailSender.testConnection();
    builder.up();
}
项目:spring-boot-concourse    文件:AbstractHealthIndicator.java   
@Override
public final Health health() {
    Health.Builder builder = new Health.Builder();
    try {
        doHealthCheck(builder);
    }
    catch (Exception ex) {
        builder.down(ex);
    }
    return builder.build();
}
项目:camunda-bpm-spring-boot-starter    文件:JobExecutorHealthIndicator.java   
@Override
protected void doHealthCheck(Builder builder) throws Exception {
  boolean active = jobExecutor.isActive();
  if (active) {
    builder = builder.up();
  } else {
    builder = builder.down();
  }
  builder.withDetail("jobExecutor", Details.from(jobExecutor));
}
项目:contestparser    文件:MailHealthIndicator.java   
@Override
protected void doHealthCheck(Builder builder) throws Exception {
    builder.withDetail("location",
            this.mailSender.getHost() + ":" + this.mailSender.getPort());
    this.mailSender.testConnection();
    builder.up();
}
项目:contestparser    文件:AbstractHealthIndicator.java   
@Override
public final Health health() {
    Health.Builder builder = new Health.Builder();
    try {
        doHealthCheck(builder);
    }
    catch (Exception ex) {
        builder.down(ex);
    }
    return builder.build();
}
项目:metadatamanagement    文件:DaraHealthIndicator.java   
@Override
protected void doHealthCheck(Builder builder) throws Exception {

  //check dara health
  if (this.daraService.isDaraHealthy()) {
    builder.up();
    builder.withDetail("location", this.daraService.getApiEndpoint());
  } else {
    builder.down();
  }
}
项目:metadatamanagement    文件:ElasticsearchHealthIndicator.java   
@Override
protected void doHealthCheck(Builder builder) throws Exception {
  JestResult result = jestClient.execute(new Stats.Builder().addIndex("_all").build());
  JsonObject map = result.getJsonObject();

  if (result.isSucceeded()) {
    builder.up();
    fillStatsForIndex(map, builder);
  } else {
    builder.down();
  }
  builder.withDetail("Number of Update Queue Items", 
      elasticsearchUpdateQueueItemRepository.count());
}
项目:metadatamanagement    文件:ElasticsearchHealthIndicator.java   
/**
 * Fill statistics for all indices.
 * 
 * @param map The json object for the _all index.
 * @param builder The spring boot builder.
 */
private void fillStatsForIndex(JsonObject map, Builder builder) {
  JsonObject indices = map.getAsJsonObject("indices");
  indices.entrySet().forEach(entry -> {
    String indexName = entry.getKey();
    JsonObject indexStats = entry.getValue().getAsJsonObject();
    JsonObject primaries = indexStats.getAsJsonObject("primaries");
    builder.withDetail(indexName + "." + "docs_count",
        primaries.getAsJsonObject("docs").get("count").getAsString());
  });
}
项目:metadatamanagement    文件:MessageBrokerHealthIndicator.java   
@Override
protected void doHealthCheck(Builder builder) throws Exception {
  if (env.acceptsProfiles(Constants.SPRING_PROFILE_LOCAL)) {
    builder.withDetail("Message Broker", "Simple (local)");
  } else {
    builder.withDetail("Message Broker", "CloudAMQP (RabbitMQ)");
  }
  builder.withDetail("Active Websocket Sessions", activeWebSocketSessionRepository.count());
  messagingTemplate.convertAndSend("/topic", "Ping");
  builder.up();      
}
项目:simple-boot    文件:RemoteHello.java   
@Override
protected void doHealthCheck(final Builder builder)
        throws Exception {
    try {
        feign.greet(In.builder().name(service).build());
        builder.up().
                withDetail("endpoint", "http://remote-hello/greet");
    } catch (final Exception e) {
        builder.outOfService().
                withDetail("endpoint", "http://remote-hello/greet").
                withDetail("exception", e.getMessage());
    }
}
项目:spring-cloud-netflix    文件:EurekaHealthIndicator.java   
@Override
public Health health() {
    Builder builder = Health.unknown();
    Status status = getStatus(builder);
    return builder.status(status).withDetail("applications", getApplications())
            .build();
}
项目:sagan    文件:ElasticsearchHealthIndicator.java   
private void fillStatsForIndex(String indexName, JsonObject map, Builder builder) {

        JsonObject indexStats = map.getAsJsonObject("indices").getAsJsonObject(indexName);
        if (indexStats != null) {
            JsonObject primaries = indexStats.getAsJsonObject("primaries");
            builder.withDetail(indexName + "." + "docs_count",
                    primaries.getAsJsonObject("docs").get("count").getAsString());
            builder.withDetail(indexName + "." + "docs_deleted",
                    primaries.getAsJsonObject("docs").get("deleted").getAsString());
            builder.withDetail(indexName + "." + "store_size",
                    primaries.getAsJsonObject("store").get("size_in_bytes").getAsString());
            builder.withDetail(indexName + "." + "query_total",
                    primaries.getAsJsonObject("search").get("query_total").getAsString());
        }
    }
项目:chimera    文件:Q2DeploymentsHealthIndicator.java   
@Override
protected void doHealthCheck(Builder builder) throws Exception
{
    final MBeanServer server = getMBeanServer();

    if (server != null)
    {
        final ObjectName on = new ObjectName("Q2:type=qbean,service=*");
        final Set<ObjectName> names = server.queryNames(on, null);
        final Stream<ObjectName> s = names.stream();

        final long muxInTransitCount = getMuxInTransitCount(server, names);
        final long tmInTransitCount = getTmInTransitCount(server, names);

        builder.withDetail("mux.in-transit", String.valueOf(muxInTransitCount));
        builder.withDetail("tm.in-transit", String.valueOf(tmInTransitCount));
        builder.withDetail("in-transit", String.valueOf(Math.max(muxInTransitCount, tmInTransitCount)));

        if (s.allMatch(name -> getStatus(server, name) == QBean.STARTED))
        {
            builder.up();
        }
        else if (s.anyMatch(name -> getStatus(server, name) == QBean.FAILED))
        {
            long cnt = s.filter(name -> getStatus(server, name) == QBean.FAILED).count();

            Set<String> objs = s.filter(name -> getStatus(server, name) == QBean.FAILED)
                .map(ObjectName::getCanonicalName)
                .collect(Collectors.toSet());

            String failedServices = StringUtils.collectionToCommaDelimitedString(objs);
            builder.withDetail("failed-count", String.valueOf(cnt));
            builder.withDetail("failed-services", failedServices);
            builder.status("failed");
        }
        else if (s.allMatch(name -> getStatus(server, name) == QBean.DESTROYED))
        {
            builder.outOfService();
        }
        else if (s.allMatch(name -> getStatus(server, name) == QBean.STOPPED))
        {
            builder.down();
        }
        else
        {
            builder.unknown();
        }
    }
    else
    {
        builder.unknown();
    }
}
项目:spring-rabbitmq-actuator    文件:RabbitQueueCheckHealthIndicator.java   
@Override
protected void doHealthCheck(Builder builder) throws Exception
{
    builder.up();

    for (QueueCheck queueCheck : queueChecks)
    {
        try
        {
            RabbitQueueProperties queueProperties = propertiesManager.request(queueCheck.getQueue());
            String queueName = queueCheck.getQueue().getName();
            int currentMessageCount = queueProperties.getMessageCount();
            int maxMessageCount = queueCheck.getMaxMessageCount();
            int currentConsumerCount = queueProperties.getConsumerCount();
            int minConsumerCount = queueCheck.getMinConsumerCount();

            Map<String, Object> details = new LinkedHashMap<String, Object>();
            details.put("status", Status.UP.getCode());
            details.put("currentMessageCount", Integer.valueOf(currentMessageCount));
            details.put("maxMessageCount", Integer.valueOf(maxMessageCount));
            details.put("currentConsumerCount", Integer.valueOf(currentConsumerCount));
            details.put("minConsumerCount", Integer.valueOf(minConsumerCount));
            builder.withDetail(queueName, details);

            if (currentMessageCount > maxMessageCount)
            {
                builder.down();
                details.put("status", Status.DOWN.getCode());
                log.warn(queueName + ": Too many messages ready (Current: " + currentMessageCount + ", " + "Max-Messages: " + queueCheck.getMaxMessageCount() + ")");
            }

            if (currentConsumerCount < minConsumerCount)
            {
                builder.down();
                details.put("status", Status.DOWN.getCode());
                log.warn(queueName + ": Not enough consumers active (Current: " + currentConsumerCount + ", " + "Min-Consumers: " + queueCheck.getMinConsumerCount() + ")");
            }
        }
        catch (Exception e)
        {
            log.error(e.getMessage(), e);
            builder.down();
        }
    }
}
项目:spring-rabbitmq-actuator    文件:RabbitQueueCheckHealthIndicatorTest.java   
@SuppressWarnings({ "unchecked", "boxing" })
@Test
public void testDoHealthCheckMultipleQueueChecksOneUpOneDown() throws Exception
{
    Queue queue1 = generateQueue("test1");
    healthIndicator.addQueueCheck(queue1, 10000, 2);
    Queue queue2 = generateQueue("test2");
    healthIndicator.addQueueCheck(queue2, 40000, 5);

    RabbitQueueProperties properties1 = new RabbitQueueProperties();
    properties1.setConsumerCount(1);
    properties1.setMessageCount(15883);
    propertiesManager.request(queue1);
    PowerMock.expectLastCall().andReturn(properties1);

    RabbitQueueProperties properties2 = new RabbitQueueProperties();
    properties2.setConsumerCount(10);
    properties2.setMessageCount(5883);
    propertiesManager.request(queue2);
    PowerMock.expectLastCall().andReturn(properties2);

    PowerMock.replayAll();
    Builder builder = new Builder(Status.OUT_OF_SERVICE);
    healthIndicator.doHealthCheck(builder);
    PowerMock.verifyAll();

    Health health = builder.build();
    Assert.assertEquals(Status.DOWN, health.getStatus());
    Assert.assertEquals(2, health.getDetails().size());

    Assert.assertNotNull(health.getDetails().get("test1"));
    Map<String, Object> details1 = (Map<String, Object>) health.getDetails().get("test1");
    Assert.assertEquals(Status.DOWN.getCode(), details1.get("status"));
    Assert.assertEquals(15883, details1.get("currentMessageCount"));
    Assert.assertEquals(10000, details1.get("maxMessageCount"));
    Assert.assertEquals(1, details1.get("currentConsumerCount"));
    Assert.assertEquals(2, details1.get("minConsumerCount"));

    Assert.assertNotNull(health.getDetails().get("test2"));
    Map<String, Object> details2 = (Map<String, Object>) health.getDetails().get("test2");
    Assert.assertEquals(Status.UP.getCode(), details2.get("status"));
    Assert.assertEquals(5883, details2.get("currentMessageCount"));
    Assert.assertEquals(40000, details2.get("maxMessageCount"));
    Assert.assertEquals(10, details2.get("currentConsumerCount"));
    Assert.assertEquals(5, details2.get("minConsumerCount"));
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:HealthMvcEndpointAutoConfigurationTests.java   
@Override
protected void doHealthCheck(Builder builder) throws Exception {
    builder.up().withDetail("foo", "bar");
}
项目:spring-boot-concourse    文件:HealthMvcEndpointAutoConfigurationTests.java   
@Override
protected void doHealthCheck(Builder builder) throws Exception {
    builder.up().withDetail("foo", "bar");
}
项目:building-microservices    文件:ExampleHealthIndicator.java   
@Override
protected void doHealthCheck(Builder builder) throws Exception {
    builder.status(this.up ? Status.UP : Status.DOWN);
}
项目:camunda-bpm-spring-boot-starter    文件:ProcessEngineHealthIndicator.java   
@Override
protected void doHealthCheck(Builder builder) throws Exception {
  builder.up().withDetail("name", processEngine.getName());
}
项目:contestparser    文件:HealthMvcEndpointAutoConfigurationTests.java   
@Override
protected void doHealthCheck(Builder builder) throws Exception {
    builder.up().withDetail("foo", "bar");
}
项目:spring-advanced-training    文件:HealthService.java   
@Override
protected void doHealthCheck(Builder builder) throws Exception {
    builder.up().withDetail("author", "Arny");
}