Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »

Table Of Content

 Related JIRA Issues
  • CPS-16 - Getting issue details... STATUS

  • CPS-158 - Getting issue details... STATUS

Overview

The CPS application monitoring and management using HTTP endpoints is implemented using Spring Boot Actuator.

The available features and endpoint paths are configured using application.yml configuration file.

Below is the list of endpoints configured with examples of usage (curl using localhost:8080 as host). 

Endpoints

Info: /actuator/info

The endpoint provides information about the application build (content of git.properties file)

$ curl http://localhost:8080/actuator/info -i -X GET

Health: /actuator/health

The set of endpoints providing the current status of various components and the application in general.

The status returned is one of below:

  • UP -  The component or subsystem is working as expected.

  • DOWN - The component is not working.

  • OUT_OF_SERVICE - The component is out of service temporarily.

  • UNKNOWN - The component state is unknown.

The following separate components are configured for health status check

  • /actuator/health/db - provides information on database type and connectivity state

  • /actuator/health/diskSpace - provides information on current disk space usage and threshold configured

  • /actuator/health/ping - ability to be pinged (always UP)

$ curl http://localhost:8080/actuator/health -i -X GET
$ curl http://localhost:8080/actuator/health/db -i -X GET
$ curl http://localhost:8080/actuator/health/diskSpace -i -X GET
$ curl http://localhost:8080/actuator/health/ping -i -X GET

The following endpoints are exposed to provide readiness and liveness probes for containerized application management
platforms like kubernetes

  • /manage/health/readiness - indicates the application completed the initialization stage and ready to accept the requests

  • /manage/health/liveness - indicates the application is up and running, no need to restart the container

$ curl http://localhost:8080/actuator/health/readiness -i -X GET
$ curl http://localhost:8080/actuator/health/liveness -i -X GET

Logging: /actuator/loggers

The endpoint allows to retrieve information about and update the log level setting on per logger identifier basis.

The following endpoints are exposed

  • /actuator/loggers - provides information about all the loggers configured

  • /actuator/loggers/{logger-id} GET - retrieves log level settings for requested logger identifier

  • /actuator/loggers/{logger-id} POST - updates or resets the log level settings for requested logger identifier

Getting log level information :

$ curl http://localhost:8080/actuator/loggers -i -X GET
$ curl http://localhost:8080/actuator/loggers/org.onap.cps -i -X GET

Updating log level:

$ curl http://localhost:8080/actuator/loggers/org.onap.cps -i -X POST -H 'Content-Type: application/json' -d '{"configuredLevel": "DEBUG"}'

Resetting log level:

$ curl http://localhost:8080/actuator/loggers/org.onap.cps -i -X POST -H 'Content-Type: application/json' -d '{}'

Resources

Documentation:

Tutorials:

  • No labels