diff options
Diffstat (limited to 'docs/clamp/acm')
-rw-r--r-- | docs/clamp/acm/acm-participant-guide.rst | 33 | ||||
-rw-r--r-- | docs/clamp/acm/design-impl/clamp-runtime-acm.rst | 32 |
2 files changed, 65 insertions, 0 deletions
diff --git a/docs/clamp/acm/acm-participant-guide.rst b/docs/clamp/acm/acm-participant-guide.rst index 56710a4c..05532a02 100644 --- a/docs/clamp/acm/acm-participant-guide.rst +++ b/docs/clamp/acm/acm-participant-guide.rst @@ -85,6 +85,39 @@ and the same is configured for the 'ParticipantIntermediaryParameters' object in typeName: org.onap.policy.clamp.acm.PolicyAutomationCompositionElement typeVersion: 1.0.0 +Kafka Healthcheck +----------------- + +Optionally is possible to add a Kafka Healthcheck by configuration. That feature is responsible of starting the Kafka configuration. +If Kafka is not up and Kafka Healthcheck is not enable, Kafka messages configuration will fail. +This feature check Kafka by an admin connection and if Kafka is up, it will start the Kafka messages configuration, +but if Kafka is not up yet, it will retry this check later. + +Kafka Healthcheck supports the topics check and it could be enabled by configuration (using topicValidation parameter). +Usually topics are getting created when first message happen, so in that scenario, topicValidation should be set as false. +In different environment, the two topics will be created manually by a script with specific permissions. So Kafka could be up, +but the Kafka messages configuration could be fail because the two topics are not get created yet. +So in that scenario, topicValidation should be set as true, and if topics are not created yet, Healthcheck will retry that check later. + +For backward compatibility if Kafka Healthcheck is not configured, it will be disabled and Kafka messages configuration will start as normal. + +The following example shows the Kafka Healthcheck configuration. + +.. code-block:: bash + + intermediaryParameters: + topicValidation: true + clampAdminTopics: + servers: + - ${topicServer:kafka:9092} + topicCommInfrastructure: kafka + fetchTimeout: 15000 + topics: + operationTopic: policy-acruntime-participant + syncTopic: acm-ppnt-sync + ........ + + Interfaces to Implement ----------------------- AutomationCompositionElementListener: diff --git a/docs/clamp/acm/design-impl/clamp-runtime-acm.rst b/docs/clamp/acm/design-impl/clamp-runtime-acm.rst index 46d4a85f..a3c22e69 100644 --- a/docs/clamp/acm/design-impl/clamp-runtime-acm.rst +++ b/docs/clamp/acm/design-impl/clamp-runtime-acm.rst @@ -430,3 +430,35 @@ YAML format is a standard for Automation Composition Type Definition. For the co text/plain ++++++++++ Text format is used by Prometheus. For the conversion from Object to String will be used **StringHttpMessageConverter**. + +JSON log format +*************** +ACM-runtime supports log in Json format. Below an example of appender for logback configuration to enable it. + +.. code-block:: xml + :caption: Part of logback configuration + :linenos: + + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder"> + <layout class="org.onap.policy.clamp.acm.runtime.config.LoggingConsoleLayout"> + <timestampFormat>YYYY-MM-DDThh:mm:ss.sss+/-hh:mm</timestampFormat> + <timestampFormatTimezoneId>Etc/UTC</timestampFormatTimezoneId> + <staticParameters>service_id=policy-acm|application_id=policy-acm</staticParameters> + </layout> + </encoder> + </appender> + +LayoutWrappingEncoder implements the encoder interface and wraps the Java class LoggingConsoleLayout as layout to which it delegates the work of transforming an event into Json string. +Parameters for LoggingConsoleLayout: + +- *timestampFormat*: Timestamp Format +- *timestampFormatTimezoneId*: Time Zone used in the Timestamp Format +- *staticParameters*: List of parameters do add into the log separated with a "|" + +Below un example of result: + +.. code-block:: json + + {"severity":"INFO","extra_data":{"logger":"network","thread":"KAFKA-source-policy-acruntime-participant"},"service_id":"policy-acm","message":"[IN|KAFKA|policy-acruntime-participant]\n{\"state\":\"ON_LINE\",\"participantDefinitionUpdates\":[],\"automationCompositionInfoList\":[],\"participantSupportedElementType\":[{\"id\":\"f88c4463-f012-42e1-8927-12b552ecf380\",\"typeName\":\"org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement\",\"typeVersion\":\"1.0.0\"}],\"messageType\":\"PARTICIPANT_STATUS\",\"messageId\":\"d3dc2f86-4253-4520-bbac-97c4c04547ad\",\"timestamp\":\"2025-01-21T16:14:27.087474035Z\",\"participantId\":\"101c62b3-8918-41b9-a747-d21eb79c6c93\",\"replicaId\":\"c1ba61d2-1dbd-44e4-80bd-135526c0615f\"}","application_id":"policy-acm","timestamp":"2025-01-21T16:14:27.114851006Z"} + {"severity":"INFO","extra_data":{"logger":"network","thread":"KAFKA-source-policy-acruntime-participant"},"service_id":"policy-acm","message":"[IN|KAFKA|policy-acruntime-participant]\n{\"state\":\"ON_LINE\",\"participantDefinitionUpdates\":[],\"automationCompositionInfoList\":[],\"participantSupportedElementType\":[{\"id\":\"4609a119-a8c7-41ee-96d1-6b49c3afaf2c\",\"typeName\":\"org.onap.policy.clamp.acm.HttpAutomationCompositionElement\",\"typeVersion\":\"1.0.0\"}],\"messageType\":\"PARTICIPANT_STATUS\",\"messageId\":\"ea29ab01-665d-4693-ab17-3a72491b5c71\",\"timestamp\":\"2025-01-21T16:14:27.117716317Z\",\"participantId\":\"101c62b3-8918-41b9-a747-d21eb79c6c91\",\"replicaId\":\"5e4f9690-742d-4190-a439-ebb4c820a010\"}","application_id":"policy-acm","timestamp":"2025-01-21T16:14:27.144379028Z"} |