From 65f9feec471b1180b7e0d466ce198290a62fc07d Mon Sep 17 00:00:00 2001 From: Vidya Shinde Date: Fri, 22 Sep 2017 21:03:43 +0530 Subject: [LOG] Add canonicalization for AAI logs Canonicalization of path for log provider configuration file and log files for new AAI components Change-Id: I34611392f25cfcd0e7e180ef672f64d7dd20928a Issue-ID: LOG-63 Signed-off-by: Vidya Shinde --- onap/aai/README.md | 95 +++++++-- onap/aai/aai-resources/conf/logback.xml | 345 ++++++++++++++++++++++++++++++++ onap/aai/aai-search/conf/logback.xml | 188 +++++++++++++++++ onap/aai/aai-sparky/conf/logback.xml | 174 ++++++++++++++++ onap/aai/aai-traversal/conf/logback.xml | 345 ++++++++++++++++++++++++++++++++ onap/aai/model-loader/conf/logback.xml | 15 +- 6 files changed, 1132 insertions(+), 30 deletions(-) create mode 100644 onap/aai/aai-resources/conf/logback.xml create mode 100644 onap/aai/aai-search/conf/logback.xml create mode 100644 onap/aai/aai-sparky/conf/logback.xml create mode 100644 onap/aai/aai-traversal/conf/logback.xml diff --git a/onap/aai/README.md b/onap/aai/README.md index a930eb9..2721df2 100644 --- a/onap/aai/README.md +++ b/onap/aai/README.md @@ -1,44 +1,97 @@ #################################################################################################################################################################### ## AAI Logging Configuration ==================================================================================================================================================================== -AAI has two docker containers- aai-service, hbase-1.2.3 and model-loader-service. +AAI has two vm instances +vm1-aai-inst1 has docker containers- testconfig_aai.searchservice.simpledemo.openecomp.org_1,testconfig_datarouter_1, +testconfig_aai-traversal.api.simpledemo.openecomp.org_1,testconfig_aai-resources.api.simpledemo.openecomp.org_1,testconfig_sparky-be_1,testconfig_model-loader_1, +vm1-aai-inst2 has docker containers- elasticsearch,testconfig_aai.gremlinserver.simpledemo.openecomp.org_1,testconfig_aai.hbase.simpledemo.openecomp.org_1. Each container has its own logback.xml Canonical logs will be generated at /var/log/onap/aai/ ==================================================================================================================================================================== ## Instructions for deployment ==================================================================================================================================================================== -### AAI logging deployment for aai-service +### AAI logging deployment for search_search.amdocs.lab_1 -------------------------------------------------------------------------------------------------------------------------------------------------------------------- - 1. Log provider file is available at the path, /etc/onap/aai/conf.d/, on the host VM. + 1. Create the log provider file path, /etc/onap/aai/conf.d/aai-search, on the host VM. 2. Copy the canonical ‘logback.xml’ from 'aai' directory (of gerrit) into the path created in step 1. - 3. Give the read access to 'others' for the file, /etc/onap/aai/conf.d/logback.xml. + 3. Give the read access to 'others' for the file, /etc/onap/aai/conf.d/aai-search/logback.xml. This will give access to the 'aaiadmin' user used by the AAI container to read this file. - 4. Create the canonical path for logs, /var/log/onap/aai, on the host VM. + 4. Create the canonical path for logs, /var/log/onap/aai/aai-search, on the host VM. 5. Provide write permissions for "others" users for directory created in step 4. 6. Volume-Mount: The aai container requires two host paths mapped as volume in the container - 6.1. Log file path: - Host path - /var/log/onap/aai/ mapped to - Container path - /var/log/onap/aai/ + 6.1. Log file path: + Host path - /var/log/onap/aai/aai-search mapped to + Container path - /var/log/onap/aai/aai-sdb 6.2. Log provider file path: - Host Path : /etc/onap/aai/conf.d/logback.xml mapped to - Container path : /opt/app/aai/bundleconfig/etc/logback.xml + Host Path : /etc/onap/aai/conf.d/aai-search/logback.xml mapped to + Container path : /opt/app/search-data-service/bundleconfig/etc/logback.xml ------------------------------------------------------------------------------------------------------------------------------------------------------------------- -### AAI logging deployment for Model-Loader +### AAI logging deployment for sparky_sparky.amdocs.lab_1 -------------------------------------------------------------------------------------------------------------------------------------------------------------------- - 1. Log provider file is available at the path, /opt/jetty/jetty*/webapps/model-loader/WEB-INF/classes/, in the container. - Note: Inside model-loader docker image. (jetty* refers to the particular version being used. - In release-1.0 environment, the name is '/jetty-distribution-9.3.9.v20160517') + 1. Create the log provider file path, /etc/onap/aai/conf.d/aai-sparky, on the host VM. 2. Copy the canonical ‘logback.xml’ from 'aai' directory (of gerrit) into the path created in step 1. - 3. Give the read access to 'others' for the file, /etc/onap/aai/conf.d/logback.xml. + 3. Give the read access to 'others' for the file, /etc/onap/aai/conf.d/aai-search/logback.xml. This will give access to the 'aaiadmin' user used by the AAI container to read this file. - 4. Create the canonical path for logs, /var/log/onap/aai/aai-ml, on the host VM. + 4. Create the canonical path for logs, /var/log/onap/aai/aai-sparky, on the host VM. 5. Provide write permissions for "others" users for directory created in step 4. - 6. Volume-Mount: The aai container requires one host path mapped as volume in the container + 6. Volume-Mount: The aai container requires two host paths mapped as volume in the container + + 6.1. Log file path: + Host path - /var/log/onap/aai/aai-sparky mapped to + Container path - /var/log/onap/aai/aai-ui + 6.2. Log provider file path: + Host Path : /etc/onap/aai/conf.d/aai-sparky/logback.xml mapped to + Container path : /opt/app/sparky/bundleconfig/etc/logback.xml +------------------------------------------------------------------------------------------------------------------------------------------------------------------- +### AAI logging deployment for modelloader_model-loader.amdocs.lab_1 +-------------------------------------------------------------------------------------------------------------------------------------------------------------------- + 1. Create the log provider file path, /etc/onap/aai/conf.d/aai-model-loader, on the host VM. + 2. Copy the canonical ‘logback.xml’ from 'aai' directory (of gerrit) into the path created in step 1. + 3. Give the read access to 'others' for the file, /etc/onap/aai/conf.d/aai-model-loader/logback.xml. + This will give access to the 'aaiadmin' user used by the AAI container to read this file. + 4. Create the canonical path for logs, /var/log/onap/aai/aai-model-loader, on the host VM. + 5. Provide write permissions for "others" users for directory created in step 4. + 6. Volume-Mount: The aai container requires two host paths mapped as volume in the container + + 6.1. Log file path: + Host path - /var/log/onap/aai/aai-model-loader mapped to + Container path - /var/log/onap/aai/aai-ml + 6.2. Log provider file path: + Host Path : /etc/onap/aai/conf.d/aai-model-loader/logback.xml mapped to + Container path : /opt/app/model-loader/bundleconfig/etc/logback.xml +------------------------------------------------------------------------------------------------------------------------------------------------------------------- +### AAI logging deployment for testconfig_aai-traversal.api.simpledemo.openecomp.org_1 +-------------------------------------------------------------------------------------------------------------------------------------------------------------------- + 1. Create the log provider file path, /etc/onap/aai/conf.d/aai-traversal, on the host VM. + 2. Copy the canonical ‘logback.xml’ from 'aai' directory (of gerrit) into the path created in step 1. + 3. Give the read access to 'others' for the file, /etc/onap/aai/conf.d/aai-traversal/logback.xml. + This will give access to the 'aaiadmin' user used by the AAI container to read this file. + 4. Create the canonical path for logs, /var/log/onap/aai/aai-traversal, on the host VM. + 5. Provide write permissions for "others" users for directory created in step 4. + 6. Volume-Mount: The aai container requires two host paths mapped as volume in the container + + 6.1. Log file path: + Host path - /var/log/onap/aai/aai-traversal mapped to + Container path - /var/log/onap/aai/ + 6.2. Log provider file path: + Host Path : /etc/onap/aai/conf.d/aai-traversal/logback.xml mapped to + Container path : /opt/app/aai-traversal/bundleconfig/etc/logback.xml +------------------------------------------------------------------------------------------------------------------------------------------------------------------- +### AAI logging deployment for testconfig_aai-resources.api.simpledemo.openecomp.org_1 +-------------------------------------------------------------------------------------------------------------------------------------------------------------------- + 1. Create the log provider file path, /etc/onap/aai/conf.d/aai-resources, on the host VM. + 2. Copy the canonical ‘logback.xml’ from 'aai' directory (of gerrit) into the path created in step 1. + 3. Give the read access to 'others' for the file, /etc/onap/aai/conf.d/aai-resources/logback.xml. + This will give access to the 'aaiadmin' user used by the AAI container to read this file. + 4. Create the canonical path for logs, /var/log/onap/aai/aai-resources, on the host VM. + 5. Provide write permissions for "others" users for directory created in step 4. + 6. Volume-Mount: The aai container requires two host paths mapped as volume in the container - 6.1. Log file path: - Host path - /var/log/onap/aai/aai-ml mapped to - Container path - /var/log/onap/aai/aai-ml + 6.1. Log file path: + Host path - /var/log/onap/aai/aai-resources mapped to + Container path - /var/log/onap/aai/aai-resources 6.2. Log provider file path: - Note: Log provider path cannot be configured externally as it is bundled inside a WAR. + Host Path : /etc/onap/aai/conf.d/aai-resources/logback.xml mapped to + Container path : /opt/app/aai-resources/bundleconfig/etc/logback.xml #################################################################################################################################################################### diff --git a/onap/aai/aai-resources/conf/logback.xml b/onap/aai/aai-resources/conf/logback.xml new file mode 100644 index 0000000..bf334df --- /dev/null +++ b/onap/aai/aai-resources/conf/logback.xml @@ -0,0 +1,345 @@ + + ${module.ajsc.namespace.name} + + + + + + + + + + + + + + + + + + + + ERROR + ACCEPT + DENY + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n + + + + ${restLogDirectory}/sane.log + + ${restLogDirectory}/sane.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + true + + + + + INFO + ACCEPT + DENY + + ${restLogDirectory}/${metricsLogName}.log + + ${restLogDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + true + + + + + DEBUG + ACCEPT + DENY + + ${restLogDirectory}/${debugLogName}.log + + ${restLogDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + true + + + + + WARN + + ${restLogDirectory}/${errorLogName}.log + + ${restLogDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + true + + + + ${restLogDirectory}/${auditLogName}.log + + ${restLogDirectory}/${auditLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + true + + + + + DEBUG + ACCEPT + DENY + + ${restLogDirectory}/translog.log + + ${restLogDirectory}/translog.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + true + + + + + WARN + + ${dmaapLogDirectory}/${errorLogName}.log + + ${dmaapLogDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + DEBUG + ACCEPT + DENY + + ${dmaapLogDirectory}/${debugLogName}.log + + ${dmaapLogDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + INFO + ACCEPT + DENY + + ${dmaapLogDirectory}/${metricsLogName}.log + + ${dmaapLogDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${perfLogsDirectory}/Audit.log + + ${perfLogsDirectory}/Audit.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + ${perfLogsDirectory}/Perform.log + + ${perfLogsDirectory}/Perform.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + true + 0 + + + + ${queueSize} + true + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/onap/aai/aai-search/conf/logback.xml b/onap/aai/aai-search/conf/logback.xml new file mode 100644 index 0000000..14ed414 --- /dev/null +++ b/onap/aai/aai-search/conf/logback.xml @@ -0,0 +1,188 @@ + + + + + + + + + + + + + + + + + + + + + ${pattern} + + + + + + + + ${logDirectory}/${errorLogName}.log + + ${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + + INFO + + ${queueSize} + + + + + ${logDirectory}/${auditLogName}.log + + ${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + + + + ${logDirectory}/${metricsLogName}.log + + ${logDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + + ${pattern} + + + + ${queueSize} + + + + ${logDirectory}/${debugLogName}.log + + ${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/onap/aai/aai-sparky/conf/logback.xml b/onap/aai/aai-sparky/conf/logback.xml new file mode 100644 index 0000000..ca6d1a9 --- /dev/null +++ b/onap/aai/aai-sparky/conf/logback.xml @@ -0,0 +1,174 @@ + + + + + + + + + + + + + + + + + + + + + ${pattern} + + + + + + + + ${logDirectory}/${errorLogName}.log + + ${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + + INFO + + ${queueSize} + + + + + ${logDirectory}/${auditLogName}.log + + ${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + + + + ${logDirectory}/${metricsLogName}.log + + ${logDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + + ${pattern} + + + + ${queueSize} + + + + ${logDirectory}/${debugLogName}.log + + ${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/onap/aai/aai-traversal/conf/logback.xml b/onap/aai/aai-traversal/conf/logback.xml new file mode 100644 index 0000000..825fac9 --- /dev/null +++ b/onap/aai/aai-traversal/conf/logback.xml @@ -0,0 +1,345 @@ + + ${module.ajsc.namespace.name} + + + + + + + + + + + + + + + + + + + ERROR + ACCEPT + DENY + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n + + + + ${restLogDirectory}/sane.log + + ${restLogDirectory}/sane.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + true + + + + + INFO + ACCEPT + DENY + + ${restLogDirectory}/${metricsLogName}.log + + ${restLogDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + true + + + + + DEBUG + ACCEPT + DENY + + ${restLogDirectory}/${debugLogName}.log + + ${restLogDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + true + + + + + WARN + + ${restLogDirectory}/${errorLogName}.log + + ${restLogDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + true + + + + ${restLogDirectory}/${auditLogName}.log + + ${restLogDirectory}/${auditLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + true + + + + + DEBUG + ACCEPT + DENY + + ${restLogDirectory}/translog.log + + ${restLogDirectory}/translog.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + true + + + + + WARN + + ${dmaapLogDirectory}/${errorLogName}.log + + ${dmaapLogDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + DEBUG + ACCEPT + DENY + + ${dmaapLogDirectory}/${debugLogName}.log + + ${dmaapLogDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + INFO + ACCEPT + DENY + + ${dmaapLogDirectory}/${metricsLogName}.log + + ${dmaapLogDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${perfLogsDirectory}/Audit-${lrmRVer}-${lrmRO}-${Pid}.log + + ${perfLogsDirectory}/Audit-${lrmRVer}-${lrmRO}-${Pid}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + ${perfLogsDirectory}/Perform-${lrmRVer}-${lrmRO}-${Pid}.log + + ${perfLogsDirectory}/Perform-${lrmRVer}-${lrmRO}-${Pid}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + true + 0 + + + + ${queueSize} + true + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/onap/aai/model-loader/conf/logback.xml b/onap/aai/model-loader/conf/logback.xml index 3443688..d512d3b 100644 --- a/onap/aai/model-loader/conf/logback.xml +++ b/onap/aai/model-loader/conf/logback.xml @@ -2,12 +2,10 @@ - - + @@ -16,7 +14,7 @@ - + @@ -47,7 +45,7 @@ INFO - 256 + ${queueSize} @@ -65,7 +63,7 @@ - 256 + ${queueSize} @@ -83,7 +81,7 @@ - 256 + ${queueSize} @@ -101,7 +99,7 @@ - 256 + ${queueSize} true @@ -161,4 +159,3 @@ - -- cgit 1.2.3-korg