Health Checkup

This section explains the Health Check, which provides you the ability to monitor the health of your application by writing a small test that returns either a healthy, degraded or unhealthy result. This is useful not only to test the internal health of your application but also its external dependencies such as a third party API which your application relies on to function correctly. In a cluster environment, the load balancer makes a routing decision to the node based on health check metrics.

Microservices' health check helps to monitor the health of Microservice APIs and Ingester. It is classified as:

  • API health check
    • Database check
    • Third-party API check
    • Business condition check
  • Ingester health check
    • Kafka check
    • Database check

API Health Checkup

All microservices expose API health check endpoint to monitor the health of microservice APIs. You can define two modes of API health check namely Normal mode (default) and Detail mode using query param in the API health check endpoint.

Pattern http://<host>:<port>/<context-root>/api/healthz?details=false
Sample http://localhost:8080/ms-paymentorder-api/api/healthz
Docker
JEE (JBoss)

API Health check endpoint performs various checks such as

  • The health of the database used by the application
  • The health of the third-party APIs used by the application. (all external APIs are configured using ClientApi.properties)
  • Monitor the current application state, which met the business condition (by implementing an interface com.temenos.microservice.framework.core.health.BusinessHealthIndicator)

Sample ClientApi.Properties is shown below.

API_URI_IRIS_1=http://10.92.17.106:9089/irf-provider-container/api/
API_URI_IRIS_2=http://10.92.7.152:9089/irf-provider-container/api/v1/healthz

Sample Business Condition Implementation (configured using api.properties) is shown below.

API_HEALTH_CHECK_BUSINESS_CONDITION = [comma-separated BusinessHealthIndicator implementation goes here]

Ingester Health Check

All microservices expose ingester health check endpoint to monitor the health of ingester to consume and process incoming messages from Kafka/kinesis topic. Ingester application is either deployed as standalone spring boot applications or in web containers.

Standalone pattern http://<host>:<port>/ingester/health (Sprint boot actuator helps to open port for health check, read Developer Notes for more information)
Sample http://localhost:8082/ingester/health
Docker (Data Ingester)

Developer Notes

  • API Health Check: GetHealthCheckImpl class is used to collect the metrics for the API health check endpoint.
  • Spring Boot Ingester Health Check: Spring actuator library is used to monitor the health of Ingester. IngesterHealthIndicator class extends
  • org.springframework.boot.actuate.health.AbstractHealthIndicator to provide the implementation to perform checks.
  • Web Container Ingester Health Check: HealthServlet class is used here to monitor the health of Ingester.
  • Environment variables:
    • className_getHealthCheck: Points the API health check implementation class. Optional. Default Value: com.temenos.microservice.framework.core.health.GetHealthCheckImpl (default value in archetype)
    • healthcheck.base.path: Provides the base path for spring actuator health endpoint. Optional. Default value: ingester

Bookmark Name Actions
Feedback
x