From 5a0d594dd5eef5026ff7a3b854b68ec2858f9da5 Mon Sep 17 00:00:00 2001 From: Vidya Shinde Date: Fri, 11 Aug 2017 16:28:12 +0530 Subject: [LOG] Add canonicalization for AAI logs Canonicalization of path for log provider configuration file and log files Change-Id: I9ed5e2d66adbf30879dfe44445fd1e7d7820bdcb Issue-ID: LOG-25 Signed-off-by: Vidya Shinde --- onap/aai/README.md | 44 +++++ onap/aai/ajsc-aai/conf/logback.xml | 296 +++++++++++++++++++++++++++++++++ onap/aai/model-loader/conf/logback.xml | 164 ++++++++++++++++++ 3 files changed, 504 insertions(+) create mode 100644 onap/aai/README.md create mode 100644 onap/aai/ajsc-aai/conf/logback.xml create mode 100644 onap/aai/model-loader/conf/logback.xml diff --git a/onap/aai/README.md b/onap/aai/README.md new file mode 100644 index 0000000..a930eb9 --- /dev/null +++ b/onap/aai/README.md @@ -0,0 +1,44 @@ +#################################################################################################################################################################### +## AAI Logging Configuration +==================================================================================================================================================================== +AAI has two docker containers- aai-service, hbase-1.2.3 and model-loader-service. +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 +-------------------------------------------------------------------------------------------------------------------------------------------------------------------- + 1. Log provider file is available at the path, /etc/onap/aai/conf.d/, 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. + 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. + 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.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 +------------------------------------------------------------------------------------------------------------------------------------------------------------------- +### AAI logging deployment for Model-Loader +-------------------------------------------------------------------------------------------------------------------------------------------------------------------- + 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') + 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. + 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. + 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.1. Log file path: + Host path - /var/log/onap/aai/aai-ml mapped to + Container path - /var/log/onap/aai/aai-ml + 6.2. Log provider file path: + Note: Log provider path cannot be configured externally as it is bundled inside a WAR. +#################################################################################################################################################################### diff --git a/onap/aai/ajsc-aai/conf/logback.xml b/onap/aai/ajsc-aai/conf/logback.xml new file mode 100644 index 0000000..2a69372 --- /dev/null +++ b/onap/aai/ajsc-aai/conf/logback.xml @@ -0,0 +1,296 @@ + + ${module.ajsc.namespace.name} + + + + + + + + + + + + + + + + + + + ERROR + ACCEPT + DENY + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n + + + + + INFO + ACCEPT + DENY + + ${restLogDirectory}/${metricsLogName}.log + + ${restLogDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + + + + + DEBUG + ACCEPT + DENY + + ${restLogDirectory}/${debugLogName}.log + + ${restLogDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + + + + + WARN + + ${restLogDirectory}/${errorLogName}.log + + ${restLogDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + + + + ${restLogDirectory}/${auditLogName}.log + + ${restLogDirectory}/${auditLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + + + + + 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} + + + + 1000 + 0 + + + + + + + + + + + + 1000 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/onap/aai/model-loader/conf/logback.xml b/onap/aai/model-loader/conf/logback.xml new file mode 100644 index 0000000..3443688 --- /dev/null +++ b/onap/aai/model-loader/conf/logback.xml @@ -0,0 +1,164 @@ + + + + + + + + + + + + + + + + + + + + + + ${pattern} + + + + + + + + ${logDirectory}/${generalLogName}.log + + ${logDirectory}/${generalLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + + INFO + + 256 + + + + ${logDirectory}/${auditLogName}.log + + ${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + 256 + + + + ${logDirectory}/${metricsLogName}.log + + ${logDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + 256 + + + + ${logDirectory}/${debugLogName}.log + + ${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + 256 + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit 1.2.3-korg