CPS Log pattern
---------------
-.. code-block:: java
+.. code-block::
<pattern>
{
- Curl command 1. Check current log level of "logging.level.org.onap.cps" if it is set to it's default value (INFO)
-.. code-block:: java
+.. code-block:: bash
- curl --location --request GET 'http://{cps-service-name:cps-management-port}/manage/loggers/org.onap.cps' \
+ curl --location --request GET 'http://{cps-service-name:cps-port}/actuator/loggers/org.onap.cps' \
--header 'Content-Type: application/json; charset=utf-8'
Response body : HTTP Status 200
.. note::
Below-mentioned endpoint will change the log level at runtime. After executing the curl command "effectiveLevel" will set and applied immediately without restarting CPS service.
-.. code-block:: java
+.. code-block:: bash
- curl --location --request POST 'http://{cps-service-name:cps-management-port}/manage/loggers/org.onap.cps' \
+ curl --location --request POST 'http://{cps-service-name:cps-port}/actuator/loggers/org.onap.cps' \
--header 'Content-Type: application/json; charset=utf-8' \
--data-raw '{
"configuredLevel": "DEBUG"
- Curl command 3. Verify if log level of "logging.level.org.onap.cps" is changed from 'INFO' to 'DEBUG'
-.. code-block:: java
+.. code-block:: bash
- curl --location --request GET 'http://{cps-service-name:cps-management-port}/manage/loggers/org.onap.cps' \
+ curl --location --request GET 'http://{cps-service-name:cps-port}/actuator/loggers/org.onap.cps' \
--header 'Content-Type: application/json; charset=utf-8'
Response body : HTTP Status 200
---------------------
By default, Spring Boot will only log to the console and will not write log files.
-.. image:: images/cps-service-console.JPG
+.. image:: _static/cps-service-console.JPG
:width: 700
:alt: CPS service console
Execute CPS service that you want to calculate total elapsed time and log as shown below
-.. code-block:: xml
+.. code-block::
2022-01-28 18:39:17.679 DEBUG [cps-application,e17da1571e518c59,e17da1571e518c59] 11128 --- [tp1901272535-29] o.onap.cps.aop.CpsLoggingAspectService : Execution time of : DataspaceRepository.getByName() with argument[s] = [test42] having result = org.onap.cps.spi.entities.DataspaceEntity@68ded236 :: 205 ms
+================================+===============================================================================================================================================+
| cps-core | `logback-spring.xml <https://github.com/onap/oom/blob/master/kubernetes/cps/components/cps-core/resources/config/logback-spring.xml>`__ |
+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
- | cps-temporal | `logback.xml <https://github.com/onap/oom/blob/master/kubernetes/cps/components/cps-temporal/resources/config/logback.xml>`__ |
- +--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
| ncmp-dmi-plugin | Not yet applicable to DMI-Plugin |
+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
.. code::
- http://<cps-component-service-name>:8081/manage/info/
+ http://<cps-component-service-name>:8080/actuator/info/
Health
------
.. code::
- http://<cps-component-service-name>:8081/manage/health/
+ http://<cps-component-service-name>:8080/actuator/health/
Metrics
-------
.. code::
- http://<cps-component-service-name>:8081/manage/prometheus
+ http://<cps-component-service-name>:8080/actuator/prometheus
Naming Validation
-----------------