diff options
Diffstat (limited to 'csit/config/clamp')
-rw-r--r-- | csit/config/clamp/AcRuntimeParameters.yaml | 7 | ||||
-rw-r--r-- | csit/config/clamp/ClampBackend.properties (renamed from csit/config/clamp/application-smoke.properties) | 40 | ||||
-rw-r--r-- | csit/config/clamp/HttpParticipantParameters.yaml | 8 | ||||
-rw-r--r-- | csit/config/clamp/KubernetesParticipantParameters.yaml | 8 | ||||
-rw-r--r-- | csit/config/clamp/PolicyParticipantParameters.yaml | 12 | ||||
-rw-r--r-- | csit/config/clamp/groups.json | 137 | ||||
-rw-r--r-- | csit/config/clamp/gui/application.yaml | 43 | ||||
-rw-r--r-- | csit/config/clamp/logback-backend.xml | 219 | ||||
-rw-r--r-- | csit/config/clamp/logback.xml | 206 |
9 files changed, 604 insertions, 76 deletions
diff --git a/csit/config/clamp/AcRuntimeParameters.yaml b/csit/config/clamp/AcRuntimeParameters.yaml index 40031828..ef686cf7 100644 --- a/csit/config/clamp/AcRuntimeParameters.yaml +++ b/csit/config/clamp/AcRuntimeParameters.yaml @@ -32,6 +32,8 @@ security: server: port: 6969 + ssl: + enabled: false servlet: context-path: /onap/policy/clamp/acm error: @@ -52,17 +54,18 @@ runtime: - ${topicServer:message-router} topicCommInfrastructure: dmaap fetchTimeout: 15000 - useHttps: true + useHttps: false topicSinks: - topic: POLICY-ACRUNTIME-PARTICIPANT servers: - ${topicServer:message-router} topicCommInfrastructure: dmaap - useHttps: true + useHttps: false management: endpoints: web: + base-path: / exposure: include: health, metrics, prometheus diff --git a/csit/config/clamp/application-smoke.properties b/csit/config/clamp/ClampBackend.properties index 40578077..b9776d04 100644 --- a/csit/config/clamp/application-smoke.properties +++ b/csit/config/clamp/ClampBackend.properties @@ -44,11 +44,11 @@ ### HTTPS Example: ### -------------- ### server.port=8443 -server.ssl.key-store=file:/opt/policy/clamp/policy-keystore -server.ssl.key-store-password=enc:qWxBtY7w9h5Hl72vQKgI5G1qqyRIuBarQqMkVDHqZmd -server.ssl.key-password=enc:qWxBtY7w9h5Hl72vQKgI5G1qqyRIuBarQqMkVDHqZmd -server.ssl.key-store-type=jks -server.port=8443 +#server.ssl.key-store=file:/opt/policy/clamp/policy-keystore +#server.ssl.key-store-password=enc:qWxBtY7w9h5Hl72vQKgI5G1qqyRIuBarQqMkVDHqZmd +#server.ssl.key-password=enc:qWxBtY7w9h5Hl72vQKgI5G1qqyRIuBarQqMkVDHqZmd +#server.ssl.key-store-type=jks +server.port=8445 ## Config part for Server certificates # Can be a classpath parameter instead of file:/ #server.ssl.key-store=classpath:/clds/aaf/org.onap.clamp.p12 @@ -56,22 +56,22 @@ server.port=8443 #server.ssl.key-password=enc:YZs7M6IftyPjHniTa6J7G2416hssb8qI-Av8D1b8pPS ## Config part for Client certificates -server.ssl.client-auth=want +#server.ssl.client-auth=want #server.ssl.trust-store=classpath:/clds/aaf/truststoreONAPall.jks #server.ssl.trust-store-password=enc:iDnPBBLq_EMidXlMa1FEuBR8TZzYxrCg66vq_XfLHdJ -server.ssl.trust-store=file:/opt/policy/clamp/policy-truststore -server.ssl.trust-store-password=enc:qWxBtY7w9h5Hl72vQKgI5G1qqyRIuBarQqMkVDHqZmd +#server.ssl.trust-store=file:/opt/policy/clamp/policy-truststore +#server.ssl.trust-store-password=enc:qWxBtY7w9h5Hl72vQKgI5G1qqyRIuBarQqMkVDHqZmd # The key file used to decode the key store and trust store password # If not defined, the key store and trust store password will not be decrypted #clamp.config.keyFile=classpath:/clds/aaf/org.onap.clamp.keyfile -clamp.config.keyFile=file:/opt/policy/clamp/clamp-be-keyfile +#clamp.config.keyFile=file:/opt/policy/clamp/clamp-be-keyfile -#server.http-to-https-redirection.port=8080 +server.http-to-https-redirection.port=8080 server.servlet.context-path=/ #Modified engine-rest applicationpath -spring.profiles.active=clamp-default,clamp-default-user,clamp-sdc-controller,clamp-ssl-config,clamp-policy-controller,default-dictionary-elements +spring.profiles.active=clamp-default,clamp-default-user,clamp-policy-controller,default-dictionary-elements spring.http.converters.preferred-json-mapper=gson #The max number of active threads in this pool @@ -134,10 +134,10 @@ async.max.pool.size=20 async.queue.capacity=500 #For logback file -#clamp.config.logback.path= -clamp.config.logback.filename=logback-default.xml +clamp.config.logback.path=/opt/policy/clamp/config +clamp.config.logback.filename=logback.xml #The log folder that will be used in logback.xml file -clamp.config.log.path=/var/log/onap/clamp +clamp.config.log.path=/var/log/onap/policy/clamp clamp.config.files.systemProperties=classpath:/system.properties clamp.config.files.cldsUsers=classpath:/clds/clds-users.json clamp.config.files.globalProperties=classpath:/clds/templates/globalProperties.json @@ -148,10 +148,10 @@ clamp.config.httpclient.connectTimeout=10000 # # Configuration Settings for Policy Engine Components -clamp.config.policy.api.url={{PROTOCOL}}${POLICY_API_HOST}:6969 +clamp.config.policy.api.url=http://${POLICY_API_HOST}:6969 clamp.config.policy.api.userName=policyadmin clamp.config.policy.api.password=zb!XztG34 -clamp.config.policy.pap.url={{PROTOCOL}}${POLICY_PAP_HOST}:6969 +clamp.config.policy.pap.url=http://${POLICY_PAP_HOST}:6969 clamp.config.policy.pap.userName=policyadmin clamp.config.policy.pap.password=zb!XztG34 @@ -160,12 +160,12 @@ clamp.config.policy.pap.password=zb!XztG34 clamp.config.sdc.csarFolder = /tmp/sdc-controllers #DCAE Inventory Url Properties -clamp.config.dcae.inventory.url={{PROTOCOL}}localhost:8085 +clamp.config.dcae.inventory.url=http://localhost:8085 clamp.config.dcae.intentory.retry.interval=10000 clamp.config.dcae.intentory.retry.limit=5 #DCAE Deployment Url Properties -clamp.config.dcae.deployment.url={{PROTOCOL}}localhost:8085 +clamp.config.dcae.deployment.url=http://localhost:8085 clamp.config.dcae.deployment.userName=test clamp.config.dcae.deployment.password=test @@ -187,11 +187,11 @@ clamp.config.tosca.converter.default.datatypes=classpath:/clds/tosca-converter/d clamp.config.tosca.converter.dictionary.support.enabled=true # Configuration settings for CDS -clamp.config.cds.url={{PROTOCOL}}cds-blueprints-processor-http:8080 +clamp.config.cds.url=http://cds-blueprints-processor-http:8080 clamp.config.cds.userName=ccsdkapps clamp.config.cds.password=ccsdkapps # Configuration settings for ControlLoop Runtime Rest API -clamp.config.acm.runtime.url={{PROTOCOL}}${RUNTIME_HOST}:6969 +clamp.config.acm.runtime.url=http://${RUNTIME_HOST}:6969 clamp.config.acm.runtime.userName=runtimeUser clamp.config.acm.runtime.password=zb!XztG34 diff --git a/csit/config/clamp/HttpParticipantParameters.yaml b/csit/config/clamp/HttpParticipantParameters.yaml index 529b095a..15768882 100644 --- a/csit/config/clamp/HttpParticipantParameters.yaml +++ b/csit/config/clamp/HttpParticipantParameters.yaml @@ -22,19 +22,21 @@ participant: - ${topicServer:message-router} topicCommInfrastructure: dmaap fetchTimeout: 15000 - useHttps: true + useHttps: false topicSinks: - topic: POLICY-ACRUNTIME-PARTICIPANT servers: - ${topicServer:message-router} topicCommInfrastructure: dmaap - useHttps: true + useHttps: false management: endpoints: web: exposure: include: health, metrics, prometheus server: - port: 8084 + port: 6969 + ssl: + enabled: false servlet: context-path: /onap/policy/clamp/acm/httpparticipant diff --git a/csit/config/clamp/KubernetesParticipantParameters.yaml b/csit/config/clamp/KubernetesParticipantParameters.yaml index c6acf405..c13f8151 100644 --- a/csit/config/clamp/KubernetesParticipantParameters.yaml +++ b/csit/config/clamp/KubernetesParticipantParameters.yaml @@ -26,14 +26,14 @@ participant: - ${topicServer:message-router} topicCommInfrastructure: dmaap fetchTimeout: 15000 - useHttps: true + useHttps: false topicSinks: - topic: POLICY-ACRUNTIME-PARTICIPANT servers: - ${topicServer:message-router} topicCommInfrastructure: dmaap - useHttps: true + useHttps: false management: endpoints: @@ -41,7 +41,9 @@ management: exposure: include: health, metrics, prometheus server: - port: 8083 + port: 6969 + ssl: + enabled: false servlet: context-path: /onap/policy/clamp/acm/k8sparticipant diff --git a/csit/config/clamp/PolicyParticipantParameters.yaml b/csit/config/clamp/PolicyParticipantParameters.yaml index 1cb4e6dc..acaaebbe 100644 --- a/csit/config/clamp/PolicyParticipantParameters.yaml +++ b/csit/config/clamp/PolicyParticipantParameters.yaml @@ -13,7 +13,7 @@ participant: port: 6969 userName: policyadmin password: zb!XztG34 - useHttps: true + useHttps: false allowSelfSignedCerts: true policyPapParameters: clientName: pap @@ -21,7 +21,7 @@ participant: port: 6969 userName: policyadmin password: zb!XztG34 - useHttps: true + useHttps: false allowSelfSignedCerts: true intermediaryParameters: reportingTimeIntervalMs: 120000 @@ -40,20 +40,22 @@ participant: - ${topicServer:message-router} topicCommInfrastructure: dmaap fetchTimeout: 15000 - useHttps: true + useHttps: false topicSinks: - topic: POLICY-ACRUNTIME-PARTICIPANT servers: - ${topicServer:message-router} topicCommInfrastructure: dmaap - useHttps: true + useHttps: false management: endpoints: web: exposure: include: health, metrics, prometheus server: - port: 8085 + port: 6969 + ssl: + enabled: false servlet: context-path: /onap/policy/clamp/acm/policyparticipant diff --git a/csit/config/clamp/groups.json b/csit/config/clamp/groups.json new file mode 100644 index 00000000..6ee30e1c --- /dev/null +++ b/csit/config/clamp/groups.json @@ -0,0 +1,137 @@ +{ + "groups": [ + { + "name": "defaultGroup", + "version": "1.0.0", + "description": "The default group that registers all supported policy types and pdps.", + "pdpGroupState": "ACTIVE", + "pdpSubgroups": [ + { + "pdpType": "xacml", + "supportedPolicyTypes": [ + { + "name": "onap.policies.controlloop.guard.common.FrequencyLimiter", + "version": "1.0.0" + }, + { + "name": "onap.policies.controlloop.guard.common.MinMax", + "version": "1.0.0" + }, + { + "name": "onap.policies.controlloop.guard.common.Blacklist", + "version": "1.0.0" + }, + { + "name": "onap.policies.controlloop.guard.common.Filter", + "version": "1.0.0" + }, + { + "name": "onap.policies.controlloop.guard.coordination.FirstBlocksSecond", + "version": "1.0.0" + }, + { + "name": "onap.policies.monitoring.*", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.*", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.AffinityPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.DistancePolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.HpaPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.OptimizationPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.PciPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.service.QueryPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.service.SubscriberPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.Vim_fit", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.VnfPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.native.Xacml", + "version": "1.0.0" + }, + { + "name": "onap.policies.Naming", + "version": "1.0.0" + }, + { + "name": "onap.policies.match.*", + "version": "1.0.0" + } + ], + "currentInstanceCount": 0, + "desiredInstanceCount": 1, + "policies": [ + { + "name": "SDNC_Policy.ONAP_NF_NAMING_TIMESTAMP", + "version": "1.0.0" + } + ] + }, + { + "pdpType": "drools", + "supportedPolicyTypes": [ + { + "name": "onap.policies.controlloop.operational.common.Drools", + "version": "1.0.0" + }, + { + "name": "onap.policies.native.drools.Controller", + "version": "1.0.0" + }, + { + "name": "onap.policies.native.drools.Artifact", + "version": "1.0.0" + } + ], + "currentInstanceCount": 0, + "desiredInstanceCount": 1, + "policies": [] + }, + { + "pdpType": "apex", + "supportedPolicyTypes": [ + { + "name": "onap.policies.controlloop.operational.common.Apex", + "version": "1.0.0" + }, + { + "name": "onap.policies.native.Apex", + "version": "1.0.0" + } + ], + "currentInstanceCount": 0, + "desiredInstanceCount": 1, + "policies": [] + } + ] + } + ] +} diff --git a/csit/config/clamp/gui/application.yaml b/csit/config/clamp/gui/application.yaml deleted file mode 100644 index a0a6c224..00000000 --- a/csit/config/clamp/gui/application.yaml +++ /dev/null @@ -1,43 +0,0 @@ -# -# ===========LICENSE_START==================================================== -# Copyright (C) 2022 Nordix Foundation. -# ============================================================================ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============LICENSE_END===================================================== -# -server: - port: 2443 - ssl: - enabled: {{HTTPS_ENABLED}} - enabled-protocols: TLSv1.2 - client-auth: want - key-store: file:${KEYSTORE} - key-store-password: ${KEYSTORE_PASSWD} - trust-store: file:${TRUSTSTORE} - trust-store-password: ${TRUSTSTORE_PASSWD} - -clamp: - url: https://policy-clamp-be:8443 - disable-ssl-validation: false - disable-ssl-hostname-check: true - -apex-editor: - upload-url: - upload-userid: - -management: - endpoints: - web: - exposure: - include: health, metrics, prometheus - diff --git a/csit/config/clamp/logback-backend.xml b/csit/config/clamp/logback-backend.xml new file mode 100644 index 00000000..cfa280c4 --- /dev/null +++ b/csit/config/clamp/logback-backend.xml @@ -0,0 +1,219 @@ +<included> + <jmxConfigurator /> + <!-- Example evaluator filter applied against console appender --> + <property name="p_tim" value="%d{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX", UTC}" /> + <property name="p_lvl" value="%level" /> + <property name="p_log" value="%logger" /> + <property name="p_mdc" value="%replace(%replace(%mdc){'\t','\\\\t'}){'\n', '\\\\n'}" /> + <property name="p_msg" value="%replace(%replace(%msg){'\t', '\\\\t'}){'\n','\\\\n'}" /> + <property name="p_exc" value="%replace(%replace(%rootException){'\t', '\\\\t'}){'\n','\\\\n'}" /> + <property name="p_mak" value="%replace(%replace(%marker){'\t', '\\\\t'}){'\n','\\\\n'}" /> + <property name="p_thr" value="%thread" /> + <property name="defaultPattern" + value="%nopexception${p_tim}\t${p_thr}\t${p_lvl}\t${p_log}\t${p_mdc}\t${p_msg}\t${p_exc}\t${p_mak}\t%n" /> + <property name="debugPattern" value="%nopexception${p_tim}|${p_lvl}|${p_mdc}|${p_exc}|%msg%n" /> + + <property name="errorPattern" + value="%X{EntryTimestamp}|%X{RequestID}|%thread|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}||||%msg%n" /> + + <property name="auditPattern" + value="%X{EntryTimestamp}|%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX,UTC}|%X{RequestID}|%X{ServiceInstanceId}|%thread|%X{VirtualServerName}|%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDesc}|%X{InstanceUUID}|%.-5level|%X{Severity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}||||%marker|%mdc|||%msg%n" /> + + <property name="metricPattern" + value="%X{InvokeTimestamp}|%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX,UTC}|%X{RequestID}|%X{ServiceInstanceId}|%thread||%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDesc}|%X{InstanceUUID}|%.-5level|%X{Severity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}||||%X{TargetVirtualEntity}|%marker|%mdc|||%msg%n" /> + + + <!-- Example evaluator filter applied against console appender --> + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>INFO</level> + </filter> + <encoder> + <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n + </pattern> + </encoder> + </appender> + + <appender name="ERROR" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>ERROR</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <file>${logDirectory}/error.log</file> + <append>true</append> + <encoder> + <pattern>${errorPattern}</pattern> + </encoder> + <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/error.%d{yyyy-MM-dd}.%i.log.zip + </fileNamePattern> + <maxFileSize>50MB</maxFileSize> + <maxHistory>20</maxHistory> + <totalSizeCap>1GB</totalSizeCap> + </rollingPolicy> + </appender> + <appender name="asyncError" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>256</queueSize> + <appender-ref ref="ERROR" /> + </appender> + + <appender name="DEBUG" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDirectory}/debug.log</file> + <append>true</append> + <encoder> + <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n + </pattern> + </encoder> + <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/debug.%d{yyyy-MM-dd}.%i.log.zip + </fileNamePattern> + <maxFileSize>50MB</maxFileSize> + <maxHistory>20</maxHistory> + <totalSizeCap>1GB</totalSizeCap> + </rollingPolicy> + </appender> + <appender name="asyncDebug" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>256</queueSize> + <appender-ref ref="DEBUG" /> + </appender> + + <appender name="AUDIT" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="org.onap.policy.common.utils.logging.LoggerMarkerFilter$AuditLoggerMarkerFilter" /> + <file>${logDirectory}/audit.log</file> + <encoder> + <pattern>${auditPattern}</pattern> + </encoder> + <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> + <FileNamePattern>${logDirectory}/audit.%d{yyyy-MM-dd}.%i.log.zip + </FileNamePattern> + <maxFileSize>50MB</maxFileSize> + <maxHistory>20</maxHistory> + <totalSizeCap>1GB</totalSizeCap> + </rollingPolicy> + </appender> + <appender name="asyncAudit" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>256</queueSize> + <appender-ref ref="AUDIT" /> + </appender> + + <appender name="METRIC" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="org.onap.policy.common.utils.logging.LoggerMarkerFilter$MetricLoggerMarkerFilter" /> + <file>${logDirectory}/metric.log</file> + <encoder> + <pattern>${metricPattern}</pattern> + </encoder> + <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> + <FileNamePattern>${logDirectory}/metric.%d{yyyy-MM-dd}.%i.log.zip + </FileNamePattern> + <maxFileSize>50MB</maxFileSize> + <maxHistory>20</maxHistory> + <totalSizeCap>1GB</totalSizeCap> + </rollingPolicy> + </appender> + <appender name="asyncMetric" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>256</queueSize> + <appender-ref ref="METRIC" /> + </appender> + + <!-- SECURITY related loggers --> + <appender name="SECURITY" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="org.onap.policy.common.utils.logging.LoggerMarkerFilter$SecurityLoggerMarkerFilter" /> + <file>${logDirectory}/security.log</file> + <encoder> + <pattern>%X{EntryTimestamp}|%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX,UTC}|%X{RequestID}|%X{ServiceInstanceId}|%.20thread|%X{VirtualServerName}|%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}|%X{Unused}|%X{ProcessKey}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n + </pattern> + </encoder> + <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> + <FileNamePattern>${logDirectory}/security.%d{yyyy-MM-dd}.%i.log.zip + </FileNamePattern> + <maxFileSize>50MB</maxFileSize> + <maxHistory>20</maxHistory> + <totalSizeCap>1GB</totalSizeCap> + </rollingPolicy> + </appender> + <appender name="asyncSecurity" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>256</queueSize> + <appender-ref ref="SECURITY" /> + </appender> + + <!-- logback jms appenders & loggers definition starts here --> + <appender name="auditLogs" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + </filter> + <file>${logDirectory}/Audits.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/Audits-%d{yyyy-MM-dd}.%i.log.zip + </fileNamePattern> + <maxFileSize>50MB</maxFileSize> + <maxHistory>20</maxHistory> + <totalSizeCap>1GB</totalSizeCap> + </rollingPolicy> + <encoder> + <pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern> + </encoder> + </appender> + + <appender name="perfLogs" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + </filter> + <file>${logDirectory}/Perform.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/Perform--%d{yyyy-MM-dd}.%i.log.zip + </fileNamePattern> + <maxFileSize>50MB</maxFileSize> + <maxHistory>20</maxHistory> + <totalSizeCap>1GB</totalSizeCap> + </rollingPolicy> + <encoder> + <pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern> + </encoder> + </appender> + + <logger name="org.onap.aaf" level="DEBUG"> + <appender-ref ref="DEBUG" /> + </logger> + <logger name="org.hibernate" level="INFO"> + <appender-ref ref="DEBUG" /> + </logger> + <logger name="org.apache.camel.Tracing" level="INFO"> + <appender-ref ref="DEBUG" /> + </logger> + + <logger name="org.apache" level="INFO"> + <appender-ref ref="DEBUG" /> + </logger> + <!-- Spring related loggers --> + <logger name="org.springframework" level="INFO"> + <appender-ref ref="DEBUG" /> + </logger> + + <!-- CLAMP related loggers --> + <logger name="org.onap.policy.clamp" level="DEBUG"> + <appender-ref ref="ERROR" /> + <appender-ref ref="DEBUG" /> + </logger> + + <!-- logback internals logging --> + <logger name="ch.qos.logback.classic" level="INFO" /> + <logger name="ch.qos.logback.core" level="INFO" /> + <logger name="AuditRecord" level="INFO" additivity="false"> + <appender-ref ref="auditLogs" /> + </logger> + <logger name="AuditRecord_DirectCall" level="INFO" additivity="false"> + <appender-ref ref="auditLogs" /> + </logger> + <logger name="PerfTrackerRecord" level="INFO" additivity="false"> + <appender-ref ref="perfLogs" /> + </logger> + <!-- logback jms appenders & loggers definition ends here --> + + <root level="DEBUG"> + <appender-ref ref="asyncDebug" /> + <appender-ref ref="asyncError" /> + <appender-ref ref="asyncAudit" /> + <appender-ref ref="asyncMetric" /> + <appender-ref ref="asyncSecurity" /> + <appender-ref ref="STDOUT" /> + </root> +</included> diff --git a/csit/config/clamp/logback.xml b/csit/config/clamp/logback.xml new file mode 100644 index 00000000..c316e179 --- /dev/null +++ b/csit/config/clamp/logback.xml @@ -0,0 +1,206 @@ +<!-- + ============LICENSE_START======================================================= + policy-clamp + ================================================================================ + Copyright (C) 2021 Nordix Foundation. + ================================================================================ + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============LICENSE_END========================================================= + --> + +<configuration scan="true" scanPeriod="30 seconds" debug="false"> + + <property name="logDir" value="${POLICY_LOGS}" /> + + <property name="errorLog" value="error" /> + <property name="debugLog" value="debug" /> + <property name="networkLog" value="network" /> + + <property name="metricLog" value="metric" /> + <property name="transactionLog" value="audit" /> + + <property name="debugPattern" + value="[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n" /> + <property name="errorPattern" value="${debugPattern}" /> + <property name="networkPattern" + value="[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%t]%m%n" /> + + <property + name="mpPreamble" + value="%X{RequestID}|%X{InvocationID}|%X{ServiceName}|%X{PartnerName}" /> + + <property + name="mpTime" + value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{ElapsedTime}" /> + + <property + name="mpLine1" + value="%X{ServiceInstanceID}|%X{VirtualServerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}" /> + + <property + name="mpLine2" + value="%X{InstanceUUID}|%X{Severity}|%X{TargetEntity}|%X{TargetServiceName}|%X{Server}|%X{ServerIPAddress}" /> + + <property + name="mpLine3" + value="%X{ServerFQDN}|%X{ClientIPAddress}|%X{ProcessKey}|%X{RemoteHost}|%X{AlertSeverity}" /> + + <property + name="mpLine4" + value="%X{TargetVirtualEntity}|%level|%thread| %msg%n" /> + + + <property name="metricPattern" + value="{$mpPreamble}|{$mpTime}|{$mpLine1}|{$mpLine2}|{$mpLine3}|$mpLine4" /> + + <property name="transactionPattern" value="${metricPattern}" /> + + <appender name="ErrorOut" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDir}/${errorLog}.log</file> + <rollingPolicy + class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> + <fileNamePattern>${logDir}/${errorLog}.%d{yyyy-MM-dd}.%i.log.zip + </fileNamePattern> + <maxFileSize>50MB</maxFileSize> + <maxHistory>30</maxHistory> + <totalSizeCap>10GB</totalSizeCap> + </rollingPolicy> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>WARN</level> + </filter> + <encoder> + <pattern>${errorPattern}</pattern> + </encoder> + </appender> + + <appender name="AsyncErrorOut" + class="ch.qos.logback.classic.AsyncAppender"> + <appender-ref ref="ErrorOut" /> + </appender> + + <appender name="DebugOut" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDir}/${debugLog}.log</file> + <rollingPolicy + class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> + <fileNamePattern>${logDir}/${debugLog}.%d{yyyy-MM-dd}.%i.log.zip + </fileNamePattern> + <maxFileSize>50MB</maxFileSize> + <maxHistory>30</maxHistory> + <totalSizeCap>10GB</totalSizeCap> + </rollingPolicy> + <encoder> + <pattern>${debugPattern}</pattern> + </encoder> + </appender> + + <appender name="AsyncDebugOut" + class="ch.qos.logback.classic.AsyncAppender"> + <appender-ref ref="DebugOut" /> + </appender> + + <appender name="NetworkOut" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDir}/${networkLog}.log</file> + <rollingPolicy + class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> + <fileNamePattern>${logDir}/${networkLog}.%d{yyyy-MM-dd}.%i.log.zip + </fileNamePattern> + <maxFileSize>50MB</maxFileSize> + <maxHistory>30</maxHistory> + <totalSizeCap>10GB</totalSizeCap> + </rollingPolicy> + <encoder> + <pattern>${networkPattern}</pattern> + </encoder> + </appender> + + <appender name="AsyncNetworkOut" + class="ch.qos.logback.classic.AsyncAppender"> + <appender-ref ref="NetworkOut" /> + </appender> + + <appender name="MetricOut" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDir}/${metricLog}.log</file> + <rollingPolicy + class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> + <fileNamePattern>${logDir}/${metricLog}.%d{yyyy-MM-dd}.%i.log.zip + </fileNamePattern> + <maxFileSize>50MB</maxFileSize> + <maxHistory>30</maxHistory> + <totalSizeCap>10GB</totalSizeCap> + </rollingPolicy> + <encoder> + <pattern>${metricPattern}</pattern> + </encoder> + </appender> + + <appender name="AsyncMetricOut" + class="ch.qos.logback.classic.AsyncAppender"> + <appender-ref ref="MetricOut" /> + </appender> + + <appender name="TransactionOut" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDir}/${transactionLog}.log</file> + <rollingPolicy + class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> + <fileNamePattern>${logDir}/${transactionLog}.%d{yyyy-MM-dd}.%i.log.zip + </fileNamePattern> + <maxFileSize>50MB</maxFileSize> + <maxHistory>30</maxHistory> + <totalSizeCap>10GB</totalSizeCap> + </rollingPolicy> + <encoder> + <pattern>${transactionPattern}</pattern> + </encoder> + </appender> + + <appender name="AsyncTransactionOut" + class="ch.qos.logback.classic.AsyncAppender"> + <appender-ref ref="TransactionOut" /> + </appender> + + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <Pattern>[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n</Pattern> + </encoder> + </appender> + + <appender name="AsyncStdOut" class="ch.qos.logback.classic.AsyncAppender"> + <appender-ref ref="STDOUT" /> + </appender> + + <logger name="network" level="INFO" additivity="false"> + <appender-ref ref="AsyncNetworkOut" /> + <appender-ref ref="AsyncStdOut" /> + </logger> + + <logger name="org.eclipse.jetty.server.RequestLog" level="info" additivity="false"> + <appender-ref ref="AsyncNetworkOut" /> + <appender-ref ref="AsyncStdOut" /> + </logger> + + <logger name="org.eclipse.jetty" level="ERROR" /> + + <root level="INFO"> + <appender-ref ref="AsyncDebugOut" /> + <appender-ref ref="AsyncErrorOut" /> + <appender-ref ref="AsyncMetricOut" /> + <appender-ref ref="AsyncTransactionOut" /> + <appender-ref ref="AsyncStdOut" /> + </root> + +</configuration> |