Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table Of Content

Table of Contents
key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution

Expand
titleRelated JIRA Issues
  • Jira Legacy
    serverSystem Jira

columns
serverId4733707d-2057-3a0f-ae5e-4fd8aff50176
keyCPS-16

  • Jira Legacy
    serverSystem Jira
    serverId4733707d-2057-3a0f-ae5e-4fd8aff50176
    keyCPS-

    16

    158

  • Jira Legacy
    serverSystem Jira
    serverId4733707d-2057-3a0f-ae5e-4fd8aff50176
    keyCPS-

    158

    2445

  • Overview

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

    ...

    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 and code repository(content of /META-INF/build-info.properties filesgit.properties file which is generated as part of the validate phase)

    Code Block
    languagebash
    $ curl http://localhost:8080/manageactuator/info -i -X GET

    Expand
    titleExample output
    Code Block
    languagejson
    {
      "git": {
        "commit": {
          "message": {
            "short": "Sample Commit from CPS Team"
          },
          "user": {
            "name": "cpsteam",
            "email": "CPSTeam@est.tech"
          },
          "id": {
            "full": "sample-commit-id-hash-which-can-be-copied-and-code-can-be-checked-out"
          }
        },
        "branch": "master",
        "build": {
          "time": "2024-11-06T16:03:37.037Z",
          "version": "3.5.5-SNAPSHOT"
        }
      }
    }

    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

    • /

      manage

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

    • /

      manage

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

    • /

      manage

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

    Code Block
    languagebash
    $ curl http://localhost:8080/manageactuator/health -i -X GET
    $ curl http://localhost:8080/manageactuator/health/db -i -X GET
    $ curl http://localhost:8080/manageactuator/health/diskSpace -i -X GET
    $ curl http://localhost:8080/manageactuator/health/ping -i -X GET

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

    • /manage/health/readiness - indicates the application completed the initialization

      state

      stage and ready to accept the requests

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

    Code Block
    languagebash
    $ curl http://localhost:8080/manageactuator/health/readiness -i -X GET
    $ curl http://localhost:8080/manageactuator/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

    • /

      manage

      actuator/loggers - provides information about all the loggers configured

    • /

      manage

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

    • /

      manage

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

    Getting log level information :

    Code Block
    languagebash
    $ curl http://localhost:8080/manageactuator/loggers -i -X GET
    $ curl http://localhost:8080/manageactuator/loggers/org.onap.cps -i -X GET

    Updating log level information:

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

    Resetting log level:

    Code Block
    languagebash
    $ curl http://localhost:8080/manageactuator/loggers/org.onap.cps -i -X GET

    ...

    POST -H 'Content-Type: application/json' -d '{}'

    Resources

    Documentation:

    Tutorials: