Code Monkey home page Code Monkey logo

liferay-healthcheck's Issues

Log4j 2 Configuration

On liferay 7.4ux the log4j configuration need to be :

<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN" xmlns="http://logging.apache.org/log4j/2.0/config">
  <Loggers>
    <Logger name="com.github.lgdd.liferay.health" level="warn"/>
  </Loggers>
</Configuration>

If not we have this log error on startup : ERROR [Start Level: Equinox Container: 3e07db71-2e7b-44ed-a493-0620a4746893][Log4jConfigUtil:62] Log4J 2 is required

If HealthCheckService components return DOWN without issues, the global status is UP

Given this component:

@Component(
    immediate = true,
    service = HealthCheckService.class
)
public class MyHealthCheck
    implements HealthCheckService {

  @Override
  public HealthCheckResponse isReady() {

    return HealthCheckResponse.builder()
                              .status(HealthCheckStatus.DOWN)
                              .message("Something's wrong I can feel it")
                              .build();
  }

  @Override
  public HealthCheckResponse isLive() {

    return HealthCheckResponse.builder()
                              .status(HealthCheckStatus.DOWN)
                              .message("Something's wrong I can feel it")
                              .build();
  }
}

Expected behaviour:
Endpoint /o/health/readiness or /o/health/liveness (depending on the configuration) returns status: DOWN.

Actual behaviour:
Endpoint /o/health/readiness or /o/health/liveness (depending on the configuration) returns status status: UP.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.