From: Itay Hassid Date: Thu, 24 Aug 2017 12:54:42 +0000 (+0000) Subject: Seed of deployment of log components X-Git-Tag: 2.0.0-ONAP~658^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=oom.git;a=commitdiff_plain;h=e2da86dc9b0b5298616249f9b18fc9d130ba84d7 Seed of deployment of log components Deployment of: Logstash + ElasticSearch + Kubana with all the configuration files Issue-ID:OOM-110 Change-Id: I1788485ccb283f0ec4dc8910479072a6cf034e5f Signed-off-by: Itay Hassid --- diff --git a/kubernetes/config/docker/init/config-init.sh b/kubernetes/config/docker/init/config-init.sh index cc3a0f62f4..b97eee0026 100755 --- a/kubernetes/config/docker/init/config-init.sh +++ b/kubernetes/config/docker/init/config-init.sh @@ -48,6 +48,7 @@ mkdir -p /config-init/$NAMESPACE/aai/elasticsearch/es-data/ mkdir -p /config-init/$NAMESPACE/aai/search-data-service/logs/ mkdir -p /config-init/$NAMESPACE/aai/data-router/logs/ mkdir -p /config-init/$NAMESPACE/mso/mariadb/data +mkdir -p /config-init/$NAMESPACE/log/elasticsearch/data echo "Setting permissions to container writeable directories" chmod -R 777 /config-init/$NAMESPACE/sdc/logs/ @@ -64,6 +65,7 @@ chmod -R 777 /config-init/$NAMESPACE/aai/elasticsearch/es-data/ chmod -R 777 /config-init/$NAMESPACE/aai/search-data-service/logs/ chmod -R 777 /config-init/$NAMESPACE/aai/data-router/logs/ chmod -R 777 /config-init/$NAMESPACE/policy/mariadb/ +chmod -R 777 /config-init/$NAMESPACE/log/elasticsearch echo "Substituting configuration parameters" @@ -107,4 +109,4 @@ find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/OPENSTACK_ENCRYPTED_PAS find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/OPENSTACK_TENANT_NAME_HERE/$OPENSTACK_TENANT_NAME/g" {} \; -echo "Done!" \ No newline at end of file +echo "Done!" diff --git a/kubernetes/config/docker/init/src/config/log/aai/ajsc-aai/logback.xml b/kubernetes/config/docker/init/src/config/log/aai/ajsc-aai/logback.xml new file mode 100644 index 0000000000..b16b6ebb18 --- /dev/null +++ b/kubernetes/config/docker/init/src/config/log/aai/ajsc-aai/logback.xml @@ -0,0 +1,295 @@ + + ${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/kubernetes/config/docker/init/src/config/log/aai/model-loader/logback.xml b/kubernetes/config/docker/init/src/config/log/aai/model-loader/logback.xml new file mode 100644 index 0000000000..cdef6d3708 --- /dev/null +++ b/kubernetes/config/docker/init/src/config/log/aai/model-loader/logback.xml @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + ${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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kubernetes/config/docker/init/src/config/log/appc/org.ops4j.pax.logging.cfg b/kubernetes/config/docker/init/src/config/log/appc/org.ops4j.pax.logging.cfg new file mode 100644 index 0000000000..c582620fa8 --- /dev/null +++ b/kubernetes/config/docker/init/src/config/log/appc/org.ops4j.pax.logging.cfg @@ -0,0 +1,151 @@ +################################################################################ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# +################################################################################ + +# Root logger +log4j.rootLogger=INFO, async, osgi:* +log4j.throwableRenderer=org.apache.log4j.OsgiThrowableRenderer + +maxFileSize=100MB +maxBackupIndex=20 +logDir=/var/log/onap +componentName=appc +logDirectory=${logDir}/${componentName} +karafLogName=karaf +errorLogName=error +metricsLogName=metrics +auditLogName=audit +debugLogName=debug + + +# CONSOLE appender not used by default +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd'T'HH:mm:ss.SSS}\t%-16.16t\t%-5.5p\t%c{36}\t%X{bundle.id} - %X{bundle.name} - %X{bundle.version}\t%m%n + +# Async appender forwarding to file appender +log4j.appender.async=org.apache.log4j.AsyncAppender +log4j.appender.async.appenders=out + +# File appender +log4j.appender.out=org.apache.log4j.RollingFileAppender +log4j.appender.out.layout=org.apache.log4j.xml.XMLLayout +log4j.appender.out.layout.Properties=true +log4j.appender.out.file=${logDirectory}/${karafLogName}.log +log4j.appender.out.append=true +log4j.appender.out.maxFileSize=${maxFileSize} +log4j.appender.out.maxBackupIndex=${maxBackupIndex} + +# Sift appender +log4j.appender.sift=org.apache.log4j.sift.MDCSiftingAppender +log4j.appender.sift.key=bundle.name +log4j.appender.sift.default=karaf +log4j.appender.sift.appender=org.apache.log4j.RollingFileAppender +log4j.appender.sift.appender.layout=org.apache.log4j.xml.XMLLayout +log4j.appender.sift.appender.layout.Properties=true +log4j.appender.sift.appender.file=${logDirectory}/$\\{bundle.name\\}.log +log4j.appender.sift.appender.append=true + + + +log4j.category.org.opendaylight.controller.netconf.persist.impl.osgi.ConfigPusherImpl=DEBUG +log4j.category.org.opendaylight.controller.netconf.persist.impl.osgi.ConfigPersisterActivator=DEBUG + + +#ECOMP Debug appender +log4j.appender.debug=org.apache.log4j.RollingFileAppender +log4j.appender.debug.key=bundle.name +log4j.appender.debug.default=karaf +log4j.appender.debug.appName=EELFDebug +log4j.appender.debug.layout=org.apache.log4j.xml.XMLLayout +log4j.appender.debug.layout.Properties=true +log4j.appender.debug.file=${logDirectory}/${debugLogName}.log +log4j.appender.debug.append=true +log4j.appender.debug.maxFileSize=${maxFileSize} +log4j.appender.debug.maxBackupIndex=${maxBackupIndex} +#log4j.appender.debug.filter.f1=org.apache.log4j.varia.LevelRangeFilter +#log4j.appender.debug.filter.f1.LevelMax=WARN +#log4j.appender.debug.filter.f1.LevelMin=TRACE + + +#Error appender +log4j.appender.error=org.apache.log4j.RollingFileAppender +log4j.appender.error.appName=EELFError +log4j.appender.error.File=${logDirectory}/${errorLogName}.log +log4j.appender.error.Threshold=ERROR +log4j.appender.error.maxFileSize=${maxFileSize} +log4j.appender.error.maxBackupIndex=${maxBackupIndex} +log4j.appender.error.layout=org.apache.log4j.xml.XMLLayout +log4j.appender.error.layout.Properties=true + +#Metrics appender +log4j.appender.metric=org.apache.log4j.RollingFileAppender +log4j.appender.metric.appName=EELFMetrics +log4j.appender.metric.File=${logDirectory}/${metricsLogName}.log +log4j.appender.metric.maxFileSize=${maxFileSize} +log4j.appender.metric.maxBackupIndex=${maxBackupIndex} +log4j.appender.metric.layout=org.apache.log4j.xml.XMLLayout +log4j.appender.metric.layout.Properties=true + +#Audit appender +log4j.appender.audit=org.apache.log4j.RollingFileAppender +log4j.appender.audit.appName=EELFAudit +log4j.appender.audit.File=${logDirectory}/${auditLogName}.log +log4j.appender.audit.maxFileSize=${maxFileSize} +log4j.appender.audit.maxBackupIndex=${maxBackupIndex} +log4j.appender.audit.layout=org.apache.log4j.xml.XMLLayout +log4j.appender.audit.layout.Properties=true + +#Loggers +#Routing of all messages from root logger +log4j.logger.com.att=TRACE, debug, error +#Store to the same log file messages from upper level appender or not +log4j.additivity.com.att=false + +#EELFManager loggers +#EELF parent logger +log4j.logger.com.att.eelf=TRACE, debug +log4j.additivity.com.att.eelf=false + +#Audit logger routing +log4j.logger.com.att.eelf.audit=DEBUG, audit +log4j.additivity.com.att.eelf.audit=false + +#Metric logger routing +log4j.logger.com.att.eelf.metrics=DEBUG, metric +log4j.additivity.com.att.eelf.metrics=false + +#Performance logger routing +log4j.logger.com.att.eelf.perf=DEBUG, metric +log4j.additivity.com.att.eelf.perf=false + +#Server logger routing +log4j.logger.com.att.eelf.server=DEBUG, debug +log4j.additivity.com.att.eelf.server=false + +#Policy logger routing +log4j.logger.com.att.eelf.policy=DEBUG, debug +log4j.additivity.com.att.eelf.policy=false + +#Error logger routing +log4j.logger.com.att.eelf.error=DEBUG, error +log4j.additivity.com.att.eelf.error=false + +#Debug logger routing +log4j.logger.com.att.eelf.debug=DEBUG, debug +log4j.additivity.com.att.eelf.debug=false diff --git a/kubernetes/config/docker/init/src/config/log/filebeat/log4j/filebeat.yml b/kubernetes/config/docker/init/src/config/log/filebeat/log4j/filebeat.yml new file mode 100644 index 0000000000..90fce2be14 --- /dev/null +++ b/kubernetes/config/docker/init/src/config/log/filebeat/log4j/filebeat.yml @@ -0,0 +1,48 @@ +filebeat.prospectors: +#it is mandatory, in our case it's log +- input_type: log + #This is the canolical path as mentioned in logback.xml, *.* means it will monitor all files in the directory. + paths: + - /var/log/onap/*/*/*.log + - /var/log/onap/*/*.log + + # The below commented properties are for time-based rolling policy. But as the log4j 1.2x does not support time-based rolling these properties are not set + #Files older than this should be ignored.In our case it will be 48 hours i.e. 2 days. It is a helping flag for clean_inactive + #ignore_older: 48h + # Remove the registry entry for a file that is more than the specified time. In our case it will be 96 hours, i.e. 4 days. It will help to keep registry records with in limit + #clean_inactive: 96h + + #Multiline properties for log4j xml log events + multiline.pattern: '' + multiline.negate: true + multiline.match: before + #multiline.max_lines: 500 + #multiline.timeout: 5s + +# Name of the registry file. If a relative path is used, it is considered relative to the +# data path. Else full qualified file name. +#filebeat.registry_file: ${path.data}/registry + + +output.logstash: + #List of logstash server ip addresses with port number. + #But, in our case, this will be the loadbalancer IP address. + #For the below property to work the loadbalancer or logstash should expose 5044 port to listen the filebeat events or port in the property should be changed appropriately. + hosts: ["logstash.onap-log:5044"] + #If enable will do load balancing among availabe Logstash, automatically. + loadbalance: true + + #The list of root certificates for server verifications. + #If certificate_authorities is empty or not set, the trusted + #certificate authorities of the host system are used. + #ssl.certificate_authorities: $ssl.certificate_authorities + + #The path to the certificate for SSL client authentication. If the certificate is not specified, + #client authentication is not available. + #ssl.certificate: $ssl.certificate + + #The client certificate key used for client authentication. + #ssl.key: $ssl.key + + #The passphrase used to decrypt an encrypted key stored in the configured key file + #ssl.key_passphrase: $ssl.key_passphrase diff --git a/kubernetes/config/docker/init/src/config/log/filebeat/logback/filebeat.yml b/kubernetes/config/docker/init/src/config/log/filebeat/logback/filebeat.yml new file mode 100644 index 0000000000..9a60dbde3e --- /dev/null +++ b/kubernetes/config/docker/init/src/config/log/filebeat/logback/filebeat.yml @@ -0,0 +1,40 @@ +filebeat.prospectors: +#it is mandatory, in our case it's log +- input_type: log + #This is the canolical path as mentioned in logback.xml, *.* means it will monitor all files in the directory. + paths: + - /var/log/onap/*/*/*.log + - /var/log/onap/*/*.log + #Files older than this should be ignored.In our case it will be 48 hours i.e. 2 days. It is a helping flag for clean_inactive + ignore_older: 48h + # Remove the registry entry for a file that is more than the specified time. In our case it will be 96 hours, i.e. 4 days. It will help to keep registry records with in limit + clean_inactive: 96h + + +# Name of the registry file. If a relative path is used, it is considered relative to the +# data path. Else full qualified file name. +#filebeat.registry_file: ${path.data}/registry + + +output.logstash: + #List of logstash server ip addresses with port number. + #But, in our case, this will be the loadbalancer IP address. + #For the below property to work the loadbalancer or logstash should expose 5044 port to listen the filebeat events or port in the property should be changed appropriately. + hosts: ["logstash.onap-log:5044"] + #If enable will do load balancing among availabe Logstash, automatically. + loadbalance: true + + #The list of root certificates for server verifications. + #If certificate_authorities is empty or not set, the trusted + #certificate authorities of the host system are used. + #ssl.certificate_authorities: $ssl.certificate_authorities + + #The path to the certificate for SSL client authentication. If the certificate is not specified, + #client authentication is not available. + #ssl.certificate: $ssl.certificate + + #The client certificate key used for client authentication. + #ssl.key: $ssl.key + + #The passphrase used to decrypt an encrypted key stored in the configured key file + #ssl.key_passphrase: $ssl.key_passphrase diff --git a/kubernetes/config/docker/init/src/config/log/mso/logback.apihandler-infra.xml b/kubernetes/config/docker/init/src/config/log/mso/logback.apihandler-infra.xml new file mode 100644 index 0000000000..d6c11888f8 --- /dev/null +++ b/kubernetes/config/docker/init/src/config/log/mso/logback.apihandler-infra.xml @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + ${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}/${errorLogName}.log + + ${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + INFO + + + + ${queueSize} + + + + ${logDirectory}/${debugLogName}.log + + ${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + + true + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/kubernetes/config/docker/init/src/config/log/mso/logback.appc.xml b/kubernetes/config/docker/init/src/config/log/mso/logback.appc.xml new file mode 100644 index 0000000000..ef9589adfc --- /dev/null +++ b/kubernetes/config/docker/init/src/config/log/mso/logback.appc.xml @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + ${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}/${errorLogName}.log + + ${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + INFO + + + + ${queueSize} + + + + ${logDirectory}/${debugLogName}.log + + ${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + + true + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/kubernetes/config/docker/init/src/config/log/mso/logback.asdc.xml b/kubernetes/config/docker/init/src/config/log/mso/logback.asdc.xml new file mode 100644 index 0000000000..99615e361c --- /dev/null +++ b/kubernetes/config/docker/init/src/config/log/mso/logback.asdc.xml @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + ${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}/${errorLogName}.log + + ${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + INFO + + + + ${queueSize} + + + + ${logDirectory}/${debugLogName}.log + + ${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + + true + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/kubernetes/config/docker/init/src/config/log/mso/logback.bpmn.xml b/kubernetes/config/docker/init/src/config/log/mso/logback.bpmn.xml new file mode 100644 index 0000000000..2e6425906c --- /dev/null +++ b/kubernetes/config/docker/init/src/config/log/mso/logback.bpmn.xml @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + ${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}/${errorLogName}.log + + ${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + INFO + + + + ${queueSize} + + + + ${logDirectory}/${debugLogName}.log + + ${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + + true + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/kubernetes/config/docker/init/src/config/log/mso/logback.msorequestsdbadapter.xml b/kubernetes/config/docker/init/src/config/log/mso/logback.msorequestsdbadapter.xml new file mode 100644 index 0000000000..e6e0591b3a --- /dev/null +++ b/kubernetes/config/docker/init/src/config/log/mso/logback.msorequestsdbadapter.xml @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + ${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}/${errorLogName}.log + + ${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + INFO + + + + ${queueSize} + + + + ${logDirectory}/${debugLogName}.log + + ${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + + true + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/kubernetes/config/docker/init/src/config/log/mso/logback.network.xml b/kubernetes/config/docker/init/src/config/log/mso/logback.network.xml new file mode 100644 index 0000000000..3e5c670e05 --- /dev/null +++ b/kubernetes/config/docker/init/src/config/log/mso/logback.network.xml @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + ${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}/${errorLogName}.log + + ${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + INFO + + + + ${queueSize} + + + + ${logDirectory}/${debugLogName}.log + + ${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + + true + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/kubernetes/config/docker/init/src/config/log/mso/logback.sdnc.xml b/kubernetes/config/docker/init/src/config/log/mso/logback.sdnc.xml new file mode 100644 index 0000000000..07d1df3914 --- /dev/null +++ b/kubernetes/config/docker/init/src/config/log/mso/logback.sdnc.xml @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + ${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}/${errorLogName}.log + + ${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + INFO + + + + ${queueSize} + + + + ${logDirectory}/${debugLogName}.log + + ${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + + true + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/kubernetes/config/docker/init/src/config/log/mso/logback.tenant.xml b/kubernetes/config/docker/init/src/config/log/mso/logback.tenant.xml new file mode 100644 index 0000000000..6e5bc2748c --- /dev/null +++ b/kubernetes/config/docker/init/src/config/log/mso/logback.tenant.xml @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + ${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}/${errorLogName}.log + + ${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + INFO + + + + ${queueSize} + + + + ${logDirectory}/${debugLogName}.log + + ${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + + true + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/kubernetes/config/docker/init/src/config/log/mso/logback.vnf.xml b/kubernetes/config/docker/init/src/config/log/mso/logback.vnf.xml new file mode 100644 index 0000000000..aca0fff177 --- /dev/null +++ b/kubernetes/config/docker/init/src/config/log/mso/logback.vnf.xml @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + ${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}/${errorLogName}.log + + ${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + INFO + + + + ${queueSize} + + + + ${logDirectory}/${debugLogName}.log + + ${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + + true + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/kubernetes/config/docker/init/src/config/log/policy/drools/logback.xml b/kubernetes/config/docker/init/src/config/log/policy/drools/logback.xml new file mode 100644 index 0000000000..2b6d11e962 --- /dev/null +++ b/kubernetes/config/docker/init/src/config/log/policy/drools/logback.xml @@ -0,0 +1,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + ${pattern} + + + + + + + + + ${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}/${errorLogName}.log + + ${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + INFO + + + + ${queueSize} + + + + ${logDirectory}/${debugLogName}.log + + ${logDirectory}/${debugLogName}.%i.log.zip + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + + true + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/kubernetes/config/docker/init/src/config/log/policy/ep_sdk_app/logback.xml b/kubernetes/config/docker/init/src/config/log/policy/ep_sdk_app/logback.xml new file mode 100644 index 0000000000..d0871bdb4a --- /dev/null +++ b/kubernetes/config/docker/init/src/config/log/policy/ep_sdk_app/logback.xml @@ -0,0 +1,190 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${pattern} + + + + + + + + ${logDirectory}/${generalLogName}.log + + + ${logDirectory}/${generalLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + ${queueSize} + + true + + + + + ${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}/${errorLogName}.log + + + ${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + INFO + + + + ${queueSize} + + + + ${logDirectory}/${debugLogName}.log + + + ${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + + true + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/kubernetes/config/docker/init/src/config/log/policy/pypdpserver/logback.xml b/kubernetes/config/docker/init/src/config/log/policy/pypdpserver/logback.xml new file mode 100644 index 0000000000..c4b596b6d5 --- /dev/null +++ b/kubernetes/config/docker/init/src/config/log/policy/pypdpserver/logback.xml @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + ${pattern} + + + + + + + + + ${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}/${errorLogName}.log + + ${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + INFO + + + + ${queueSize} + + + + ${logDirectory}/${debugLogName}.log + + ${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + + true + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/kubernetes/config/docker/init/src/config/log/policy/xacml-pap-rest/logback.xml b/kubernetes/config/docker/init/src/config/log/policy/xacml-pap-rest/logback.xml new file mode 100644 index 0000000000..77068bb9aa --- /dev/null +++ b/kubernetes/config/docker/init/src/config/log/policy/xacml-pap-rest/logback.xml @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + ${pattern} + + + + + + + + + ${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}/${errorLogName}.log + + ${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + INFO + + + + ${queueSize} + + + + ${logDirectory}/${debugLogName}.log + + ${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + + true + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/kubernetes/config/docker/init/src/config/log/policy/xacml-pdp-rest/logback.xml b/kubernetes/config/docker/init/src/config/log/policy/xacml-pdp-rest/logback.xml new file mode 100644 index 0000000000..c9c05d922d --- /dev/null +++ b/kubernetes/config/docker/init/src/config/log/policy/xacml-pdp-rest/logback.xml @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + ${pattern} + + + + + + + + + ${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}/${errorLogName}.log + + ${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + INFO + + + + ${queueSize} + + + + ${logDirectory}/${debugLogName}.log + + ${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + + true + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/kubernetes/config/docker/init/src/config/log/portal/portal-be/logback.xml b/kubernetes/config/docker/init/src/config/log/portal/portal-be/logback.xml new file mode 100644 index 0000000000..26533ef751 --- /dev/null +++ b/kubernetes/config/docker/init/src/config/log/portal/portal-be/logback.xml @@ -0,0 +1,244 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${pattern} + + + + + + + + ${logDirectory}/${generalLogName}.log + + + ${logDirectory}/${generalLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + ${queueSize} + + true + + + + + + + + + + + + + ${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}/${errorLogName}.log + + + ${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + + + + ${debugLogDirectory}/${debugLogName}.log + + + ${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + + true + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/kubernetes/config/docker/init/src/config/log/portal/portal-db/logback.xml b/kubernetes/config/docker/init/src/config/log/portal/portal-db/logback.xml new file mode 100644 index 0000000000..4990fac239 --- /dev/null +++ b/kubernetes/config/docker/init/src/config/log/portal/portal-db/logback.xml @@ -0,0 +1,306 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${pattern} + + + + + + + + ${logDirectory}/${generalLogName}.log + + + ${logDirectory}/${generalLogName}.%d{yyyy-MM-dd}.%i.log + + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + ${queueSize} + + true + + + + + + + + + + + + + ${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}/${errorLogName}.log + + + ${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log + + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + + + + ${debugLogDirectory}/${debugLogName}.log + + + ${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log + + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/kubernetes/config/docker/init/src/config/log/sdc/be/logback.xml b/kubernetes/config/docker/init/src/config/log/sdc/be/logback.xml new file mode 100644 index 0000000000..4d508e3047 --- /dev/null +++ b/kubernetes/config/docker/init/src/config/log/sdc/be/logback.xml @@ -0,0 +1,187 @@ + + + + + + + + + + + + + + + + + + + + + + + + + ${logDirectory}/${allLogName}.log + + ${logDirectory}/${allLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + + + + + + ${logDirectory}/${errorLogName}.log + + + + AUDIT_MARKER + + NEUTRAL + DENY + + + + + TRANSACTION_MARKER + + NEUTRAL + DENY + + + + INFO + + + ${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + ${logDirectory}/${debugLogName}.log + + + + + TRANSACTION_MARKER + + NEUTRAL + DENY + + + + + e.level.toInt() <= DEBUG.toInt() + + DENY + NEUTRAL + + + ${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + ${logDirectory}/${auditLogName}.log + + + + AUDIT_MARKER + + DENY + ACCEPT + + + ${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + ${logDirectory}/${transactionLogName}.log + + + + TRANSACTION_MARKER + + DENY + ACCEPT + + + ${logDirectory}/${transactionLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + ${queueSize} + + + + ${queueSize} + + + + ${queueSize} + + + + ${queueSize} + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/kubernetes/config/docker/init/src/config/log/sdc/fe/logback.xml b/kubernetes/config/docker/init/src/config/log/sdc/fe/logback.xml new file mode 100644 index 0000000000..a8e9ed7264 --- /dev/null +++ b/kubernetes/config/docker/init/src/config/log/sdc/fe/logback.xml @@ -0,0 +1,187 @@ + + + + + + + + + + + + + + + + + + + + + + + + + ${logDirectory}/${allLogName}.log + + ${logDirectory}/${allLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + + + + + + ${logDirectory}/${errorLogName}.log + + + + AUDIT_MARKER + + NEUTRAL + DENY + + + + + TRANSACTION_MARKER + + NEUTRAL + DENY + + + + INFO + + + ${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + ${logDirectory}/${debugLogName}.log + + + + + TRANSACTION_MARKER + + NEUTRAL + DENY + + + + + e.level.toInt() <= DEBUG.toInt() + + DENY + NEUTRAL + + + ${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + ${logDirectory}/${auditLogName}.log + + + + AUDIT_MARKER + + DENY + ACCEPT + + + ${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + ${logDirectory}/${transactionLogName}.log + + + + TRANSACTION_MARKER + + DENY + ACCEPT + + + ${logDirectory}/${transactionLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + ${queueSize} + + + + ${queueSize} + + + + ${queueSize} + + + + ${queueSize} + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/kubernetes/config/docker/init/src/config/log/sdnc/org.ops4j.pax.logging.cfg b/kubernetes/config/docker/init/src/config/log/sdnc/org.ops4j.pax.logging.cfg new file mode 100644 index 0000000000..50818a3d18 --- /dev/null +++ b/kubernetes/config/docker/init/src/config/log/sdnc/org.ops4j.pax.logging.cfg @@ -0,0 +1,57 @@ +################################################################################ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# +################################################################################ + +# Root logger +log4j.rootLogger=INFO, async, osgi:* +log4j.throwableRenderer=org.apache.log4j.OsgiThrowableRenderer + +# Log Directory +logDir=/var/log/onap +componentName=sdnc +logDirectory=${logDir}/${componentName} +maxFileSize=100MB +maxBackupIndex=20 + +# CONSOLE appender not used by default +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd'T'HH:mm:ss.SSS}\t%-16.16t\t%-5.5p\t%c{36}\t%X{bundle.id} - %X{bundle.name} - %X{bundle.version}\t%m%n + +# Async appender forwarding to file appender +log4j.appender.async=org.apache.log4j.AsyncAppender +log4j.appender.async.appenders=out + +# File appender +log4j.appender.out=org.apache.log4j.RollingFileAppender +log4j.appender.out.layout=org.apache.log4j.xml.XMLLayout +log4j.appender.out.layout.Properties=true +log4j.appender.out.file=${logDirectory}/karaf.log +log4j.appender.out.append=true +log4j.appender.out.maxFileSize=${maxFileSize} +log4j.appender.out.maxBackupIndex=${maxBackupIndex} + +# Sift appender +log4j.appender.sift=org.apache.log4j.sift.MDCSiftingAppender +log4j.appender.sift.key=bundle.name +log4j.appender.sift.default=karaf +log4j.appender.sift.appender=org.apache.log4j.RollingFileAppender +log4j.appender.sift.appender.layout=org.apache.log4j.xml.XMLLayout +log4j.appender.sift.appender.layout.Properties=true +log4j.appender.sift.appender.file=${logDirectory}/$\\{bundle.name\\}.log +log4j.appender.sift.appender.append=true diff --git a/kubernetes/config/docker/init/src/config/log/vid/logback.xml b/kubernetes/config/docker/init/src/config/log/vid/logback.xml new file mode 100644 index 0000000000..d3177f03ce --- /dev/null +++ b/kubernetes/config/docker/init/src/config/log/vid/logback.xml @@ -0,0 +1,299 @@ + + + + + + + + + + + + + + + + + + + + + + + + + ${pattern} + + + + + + + + ${logDirectory}/${generalLogName}.log + + ${logDirectory}/${generalLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + ${queueSize} + true + + + + + + + + + + + + + ${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}/${errorLogName}.log + + ${logDirectory}/${errorLogName}.%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} + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/kubernetes/log/Chart.yaml b/kubernetes/log/Chart.yaml new file mode 100644 index 0000000000..36d0299a4c --- /dev/null +++ b/kubernetes/log/Chart.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +description: A Helm chart for Kubernetes +name: log +version: 0.1.0 diff --git a/kubernetes/log/resources/elasticsearch/conf/elasticsearch.yml b/kubernetes/log/resources/elasticsearch/conf/elasticsearch.yml new file mode 100644 index 0000000000..de92a584e9 --- /dev/null +++ b/kubernetes/log/resources/elasticsearch/conf/elasticsearch.yml @@ -0,0 +1,140 @@ +# ======================== Elasticsearch Configuration ========================= +# +# NOTE: Elasticsearch comes with reasonable defaults for most settings. +# Before you set out to tweak and tune the configuration, make sure you +# understand what are you trying to accomplish and the consequences. +# +# The primary way of configuring a node is via this file. This template lists +# the most important settings you may want to configure for a production cluster. +# +# Please consult the documentation for further information on configuration options: +# https://www.elastic.co/guide/en/elasticsearch/reference/index.html +# +# ---------------------------------- Cluster ----------------------------------- +# +# Name of the Elasticsearch cluster. +# A node can only join a cluster when it shares its cluster.name with all the other nodes in the cluster. +# The default name is elasticsearch, but you should change it to an appropriate name which describes the +# purpose of the cluster. +# +cluster.name: "onap-log" +# +# The port that other nodes in the cluster should use when communicating with this node. +# Required for Elasticsearch's nodes running on different cluster nodes. +# More : https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-transport.html +transport.publish_port:$transport.publish_port +# +# The host address to publish for nodes in the cluster to connect to. +# Required for Elasticsearch's nodes running on different cluster nodes. +# More : https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-transport.html +transport.publish_host:$transport.publish_host +# +# ------------------------------------ Node ------------------------------------ +# +# It is better to provide different meaningfull names fot different elastic nodes. +# By default, Elasticsearch will take the 7 first character of the randomly generated uuid used as the node id. +# Note that the node id is persisted and does not change when a node restarts +# +#node.name: $node.name +# +# Add custom attributes to the node: +# +#node.attr.rack: r1 +# +# ----------------------------------- Paths ------------------------------------ +# +# The location of the data files of each index / shard allocated on the node. Can hold multiple locations separated by coma. +# In production, we should not keep this default to "/elasticsearch/data", as on upgrading Elasticsearch, directory structure +# may change & can deal to data loss. +path.data: /usr/share/elasticsearch/data +# +# Elasticsearch's log files location. In production, we should not keep this default to "/elasticsearch/logs", +# as on upgrading Elasticsearch, directory structure may change. +path.logs: /usr/share/elasticsearch/logs +# +# ----------------------------------- Memory ----------------------------------- +# +# It is vitally important to the health of your node that none of the JVM is ever swapped out to disk. +# Lock the memory on startup. +# +bootstrap.memory_lock: true +# +# Make sure that the heap size is set to about half the memory available +# on the system and that the owner of the process is allowed to use this +# limit. +# +# Elasticsearch performs poorly when the system is swapping the memory. +# +# ---------------------------------- Network ----------------------------------- +# +# Set the bind address to a specific IP (IPv4 or IPv6): +# In order to communicate and to form a cluster with nodes on other servers, your node will need to bind to a +# non-loopback address. +network.host: 0.0.0.0 +# +# Set a custom port for HTTP: If required, default is 9200-9300 +# +#http.port: $http.port +# +# For more information, consult the network module documentation. +# +# --------------------------------- Discovery ---------------------------------- +# +# Pass an initial list of hosts to perform discovery when new node is started: +# To form a cluster with nodes on other servers, you have to provide a seed list of other nodes in the cluster +# that are likely to be live and contactable. +# By default, Elasticsearch will bind to the available loopback addresses and will scan ports 9300 to 9305 to try +# to connect to other nodes running on the same server. +# +discovery.zen.ping.unicast.hosts: ["elasticsearch.onap-log"] +#$discovery.zen.ping.unicast.hosts +# +# This setting tells Elasticsearch to not elect a master unless there are enough master-eligible nodes +# available. Only then will an election take place. +# Prevent the "split brain" by configuring the majority of nodes (total number of master-eligible nodes / 2 + 1): +discovery.zen.minimum_master_nodes: 1 +# +# For more information, consult the zen discovery module documentation. +# +# ---------------------------------- Gateway ----------------------------------- +# +# Block initial recovery after a full cluster restart until N nodes are started: +# +#gateway.recover_after_nodes: 3 +# +# For more information, consult the gateway module documentation. +# +# ---------------------------------- Various ----------------------------------- +# +# Require explicit names when deleting indices: +# +#action.destructive_requires_name: true +# Set a custom port for HTTP: If required, default is 9200-9300 +# This is used for REST APIs +http.port: 9200 +# Port to bind for communication between nodes. Accepts a single value or a range. +# If a range is specified, the node will bind to the first available port in the range. +# Defaults to 9300-9400. +# More info: +transport.tcp.port: 9300 + +xpack.graph.enabled: false +#Set to false to disable X-Pack graph features. + +xpack.ml.enabled: false +#Set to false to disable X-Pack machine learning features. + +xpack.monitoring.enabled: false +#Set to false to disable X-Pack monitoring features. + +xpack.reporting.enabled: false +#Set to false to disable X-Pack reporting features. + +xpack.security.enabled: false +#Set to false to disable X-Pack security features. + +xpack.watcher.enabled: false +#Set to false to disable Watcher. + +index.number_of_replicas: 0 + diff --git a/kubernetes/log/resources/kibana/conf/kibana.yml b/kubernetes/log/resources/kibana/conf/kibana.yml new file mode 100644 index 0000000000..0f72daa497 --- /dev/null +++ b/kubernetes/log/resources/kibana/conf/kibana.yml @@ -0,0 +1,116 @@ +xpack.graph.enabled: false +#Set to false to disable X-Pack graph features. +xpack.ml.enabled: false +#Set to false to disable X-Pack machine learning features. +xpack.monitoring.enabled: false +#Set to false to disable X-Pack monitoring features. +xpack.reporting.enabled: false +#Set to false to disable X-Pack reporting features. +xpack.security.enabled: false +#Set to false to disable X-Pack security features. +xpack.watcher.enabled: false +#Set to false to disable Watcher. +# Kibana is served by a back end server. This setting specifies the port to use. +server.port: 5601 + +# Specifies the address to which the Kibana server will bind. IP addresses and host names are both valid values. +# The default is 'localhost', which usually means remote machines will not be able to connect. +# To allow connections from remote users, set this parameter to a non-loopback address. +server.host: "0" + +# Enables you to specify a path to mount Kibana at if you are running behind a proxy. This only affects +# the URLs generated by Kibana, your proxy is expected to remove the basePath value before forwarding requests +# to Kibana. This setting cannot end in a slash. +#server.basePath: "" + +# The maximum payload size in bytes for incoming server requests. +#server.maxPayloadBytes: 1048576 + +# The Kibana server's name. This is used for display purposes. +server.name: "Kibana" + +# The URL of the Elasticsearch instance to use for all your queries. +elasticsearch.url: "http://elasticsearch.onap-log:9200" +#elasticsearch-service.onap-log:9200" +#elasticsearch.url: "http://10.247.47.3:9200" +# When this setting's value is true Kibana uses the hostname specified in the server.host +# setting. When the value of this setting is false, Kibana uses the hostname of the host +# that connects to this Kibana instance. +#elasticsearch.preserveHost: true + +# Kibana uses an index in Elasticsearch to store saved searches, visualizations and +# dashboards. Kibana creates a new index if the index doesn't already exist. +#kibana.index: ".kibana" + +# The default application to load. +#kibana.defaultAppId: "discover" + +# If your Elasticsearch is protected with basic authentication, these settings provide +# the username and password that the Kibana server uses to perform maintenance on the Kibana +# index at startup. Your Kibana users still need to authenticate with Elasticsearch, which +# is proxied through the Kibana server. +elasticsearch.username: "elastic" +elasticsearch.password: "changeme" +# Enables SSL and paths to the PEM-format SSL certificate and SSL key files, respectively. +# These settings enable SSL for outgoing requests from the Kibana server to the browser. +#server.ssl.enabled: $server_ssl_enabled +#server.ssl.certificate: $server_ssl_certificate +#server.ssl.key: $server_ssl_key + +# Optional settings that provide the paths to the PEM-format SSL certificate and key files. +# These files validate that your Elasticsearch backend uses the same key files. +#elasticsearch.ssl.certificate: $elasticsearch_ssl_certificate +#elasticsearch.ssl.key: $elasticsearch_ssl_key + +# Optional setting that enables you to specify a path to the PEM file for the certificate +# authority for your Elasticsearch instance. +#elasticsearch.ssl.certificateAuthorities: $elasticsearch_ssl_certificateAuthorities + +# To disregard the validity of SSL certificates, change this setting's value to 'none'. +#elasticsearch.ssl.verificationMode: $elasticsearch_ssl_verificationMode + +# Time in milliseconds to wait for Elasticsearch to respond to pings. Defaults to the value of +# the elasticsearch.requestTimeout setting. +#elasticsearch.pingTimeout: 1500 + +# Time in milliseconds to wait for responses from the back end or Elasticsearch. This value +# must be a positive integer. +#elasticsearch.requestTimeout: 30000 + +# List of Kibana client-side headers to send to Elasticsearch. To send *no* client-side +# headers, set this value to [] (an empty list). +#elasticsearch.requestHeadersWhitelist: [ authorization ] + +# Header names and values that are sent to Elasticsearch. Any custom headers cannot be overwritten +# by client-side headers, regardless of the elasticsearch.requestHeadersWhitelist configuration. +#elasticsearch.customHeaders: {} + +# Time in milliseconds for Elasticsearch to wait for responses from shards. Set to 0 to disable. +#elasticsearch.shardTimeout: 0 + +# Time in milliseconds to wait for Elasticsearch at Kibana startup before retrying. +#elasticsearch.startupTimeout: 5000 + +# Specifies the path where Kibana creates the process ID file. +#pid.file: /var/run/kibana.pid + +# Enables you specify a file where Kibana stores log output. +#logging.dest: stdout + +# Set the value of this setting to true to suppress all logging output. +#logging.silent: false + +# Set the value of this setting to true to suppress all logging output other than error messages. +#logging.quiet: false + +# Set the value of this setting to true to log all events, including system usage information +# and all requests. +#logging.verbose: false + +# Set the interval in milliseconds to sample system and process performance +# metrics. Minimum is 100ms. Defaults to 5000. +#ops.interval: 5000 + +# The default locale. This locale can be used in certain circumstances to substitute any missing +# translations. +#i18n.defaultLocale: "en" diff --git a/kubernetes/log/resources/logstash/conf/logstash.yml b/kubernetes/log/resources/logstash/conf/logstash.yml new file mode 100644 index 0000000000..f658006503 --- /dev/null +++ b/kubernetes/log/resources/logstash/conf/logstash.yml @@ -0,0 +1,16 @@ +http.host: "0.0.0.0" +## Path where pipeline configurations reside +path.config: /usr/share/logstash/pipeline + +## Type of queue : memeory based or file based +#queue.type: persisted +## Size of queue +#queue.max_bytes: 1024mb +## Setting true makes logstash check periodically for change in pipeline configurations +config.reload.automatic: true + +## xpack configurations +#xpack.monitoring.elasticsearch.url: ["http://10.247.186.12:9200", "http://10.247.186.13:9200"] +#xpack.monitoring.elasticsearch.username: elastic +#xpack.monitoring.elasticsearch.password: changeme +xpack.monitoring.enabled: false diff --git a/kubernetes/log/resources/logstash/pipeline/onap-pipeline.conf b/kubernetes/log/resources/logstash/pipeline/onap-pipeline.conf new file mode 100644 index 0000000000..1a46375047 --- /dev/null +++ b/kubernetes/log/resources/logstash/pipeline/onap-pipeline.conf @@ -0,0 +1,204 @@ +input { + beats { + + ## Add a id to plugin configuration. Can be anything unique. + id => 'beats_plugin' + + ######## Connection configurations ######## + + ## The port to listen on. + port => 5044 + + ## Close Idle clients after the specified time in seconds. Default is 60 seconds + #client_inactivity_timeout => 60 + + ######## Security configurations ######## + + ## Enable encryption. Default false. + #ssl => $filebeat_ssl + + ## ssl certificate path. + #ssl_certificate => $filebeat_ssl_certificate + + ## SSL key to use. + #ssl_key => $filebeat_ssl_key + + ##SSL key passphrase to use. + #ssl_key_passphrase => $filebeat_ssl_key_passphrase + + ## Value can be any of: none, peer, force_peer. + #ssl_verify_mode => $filebeat_ssl_verify_mode + + ## Time in milliseconds for an incomplete ssl handshake to timeout. Default is 10000 ms. + #ssl_handshake_timeout => 10000 + include_codec_tag => false + } +} + + +filter { + # Filter for log4j xml events + if "" in [message] { + #Filter to parse xml event and retrieve data + xml { + source => "message" + store_xml => false + remove_namespaces => true + target => "xml_content" + xpath => [ "/event/message/text()", "logmsg" , + "/event/@logger", "Logger", + "/event/@timestamp", "Timestamp", + "/event/@level", "loglevel", + "/event/@thread", "Thread", + "/event/throwable/text()", "Exceptionthrowable", + "/event/NDC/text()", "NDCs", + "/event/properties/data/@name","mdcname", + "/event/properties/data/@value","mdcvalue"] + + } + + #Ruby filter to iterate and separate MDCs into documents + ruby { + code => ' + $i = 0 + $num = 0 + if event.get("[mdcname]") + $num = event.get("[mdcname]").length + end + if $num != 0 + until $i > $num do + if event.get("[mdcname]").at($i) and event.get("[mdcvalue]").at($i) + event.set(event.get("[mdcname]").at($i), event.get("[mdcvalue]").at($i)) + end + $i=$i+1 + end + end + ' + } + + #Validations + if [Exceptionthrowable] + { + mutate { + replace => { + "exceptionmessage" => "%{[Exceptionthrowable]}" + } + } + } + + if [NDCs] + { + mutate { + replace => { + "NDC" => "%{[NDCs]}" + } + } + } + + mutate { + replace => { + "Logger" =>"%{[Logger]}" + "logmsg" =>"%{[logmsg]}" + "Timestamp" =>"%{[Timestamp]}" + "loglevel" =>"%{[loglevel]}" + "message" => "%{logmsg}" + "Thread" => "%{[Thread]}" + } + remove_field => ["mdcname", "mdcvalue", "logmsg","Exceptionthrowable","NDCs"] + } + + if [Timestamp] + { + date { + match => ["Timestamp", "UNIX_MS"] + target => "Timestamp" + } + } + } + # Filter for logback events + else { + mutate { + gsub => [ + 'message', '= ', '=null', + 'message', '=\t', '=null ', #This null is followed by a tab + 'message', '\t$', '\t' + ] + } + kv { + field_split => "\t" + trim_key => "\s" + trim_value => "\s" + } + grok { + break_on_match => false + match => { + "message" => "%{TIMESTAMP_ISO8601:Timestamp}\t%{GREEDYDATA:Thread}\t%{SPACE}%{LOGLEVEL:loglevel}%{SPACE}\t%{JAVACLASS:Logger}\t(?:[^\t]+\t)*%{GREEDYDATA:message}" + } + overwrite => ["message"] + } + } +} + + +output { + elasticsearch { + id => 'onap_es' + + ######### Security configurations ######### + + user => "elastic" + password => "changeme" + + ## The .cer or .pem file to validate the server’s certificate + #cacert => $es_cacert + + ## The keystore used to present a certificate to the server. It can be either .jks or .p12 + #keystore => $es_keystore + #keystore_password => $es_keystore_password + + ## Enable SSL/TLS secured communication to Elasticsearch cluster. + ## Default is not set which in that case depends on the protocol specidfied in hosts list + #ssl => $es_ssl + + ## Option to validate the server’s certificate. Default is true + #ssl_certificate_verification => $es_ssl_certificate_verification + + ## The JKS truststore to validate the server’s certificate. + #truststore => $es_truststore + #truststore_password => $es_truststore_password + + + ######### Elasticsearchcluster and host configurations ######### + +#can specify one or a list of hosts. If sniffing is set, one is enough and others will be auto-discovered +##Also protocol can be specified like ["http://10.247.186.12:9200"] + hosts => ["http://elasticsearch.onap-log:9200"] + + + ## This setting asks Elasticsearch for the list of all cluster nodes and adds them to the hosts list. Default is false. + sniffing => true + + ## How long to wait, in seconds, between sniffing attempts. Default is 5 seconds. + #sniffing_delay => 5 + + ## Set the address of a forward HTTP proxy. + #proxy => $es_proxy + + ##Use this if you must run Elasticsearch behind a proxy that remaps the root path for the Elasticsearch HTTP API lives + #path => $es_path + + ######### Elasticsearch request configurations ######### + + ## This setting defines the maximum sized bulk request Logstash will make. + #flush_size => ? + + ######### Document configurations ######### + + index => "onaplogs-%{+YYYY.MM.dd}" + document_type => "logs" + + ## This can be used to associate child documents with a parent using the parent ID. + #parent => "abcd' + } +} + diff --git a/kubernetes/log/templates/all-services.yaml b/kubernetes/log/templates/all-services.yaml new file mode 100644 index 0000000000..5f9412e872 --- /dev/null +++ b/kubernetes/log/templates/all-services.yaml @@ -0,0 +1,49 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: elasticsearch + name: elasticsearch + namespace: {{ .Values.nsPrefix }}-log +spec: + ports: + - name: http + port: 9200 + targetPort: 9200 + nodePort: {{ .Values.nodePortPrefix }}54 + selector: + app: elasticsearch + type: NodePort +--- +apiVersion: v1 +kind: Service +metadata: + name: logstash + namespace: {{ .Values.nsPrefix }}-log + labels: + app: logstash +spec: + ports: + - name: transport + port: 5044 + targetPort: 5044 + selector: + app: logstash +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: kibana + name: kibana + namespace: {{ .Values.nsPrefix }}-log +spec: + ports: + - name: tcp-ks + port: 5601 + targetPort: 5601 + nodePort: {{ .Values.nodePortPrefix }}53 + selector: + app: kibana + type: NodePort + diff --git a/kubernetes/log/templates/elasticsearch-deployment.yaml b/kubernetes/log/templates/elasticsearch-deployment.yaml new file mode 100644 index 0000000000..75df8a16e1 --- /dev/null +++ b/kubernetes/log/templates/elasticsearch-deployment.yaml @@ -0,0 +1,81 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + labels: + app: elasticsearch + name: elasticsearch + namespace: {{ .Values.nsPrefix }}-log +spec: + selector: + matchLabels: + app: elasticsearch + template: + metadata: + labels: + app: elasticsearch + name: elasticsearch + annotations: + pod.beta.kubernetes.io/init-containers: '[ + { + "command": ["sysctl", "-w", "vm.max_map_count=262144"], + "env": [ + { + "name": "NAMESPACE", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.namespace" + } + } + } + ], + "securityContext": { + "privileged": true + }, + "image": "{{ .Values.image.es_bb }}", + "imagePullPolicy": "{{ .Values.pullPolicy }}", + "name": "init-sysctl" + } + ]' + spec: + containers: + - name: elasticsearch + image: {{ .Values.image.elasticsearch}} + ports: + - containerPort: 9200 + name: http + protocol: TCP + - containerPort: 9300 + name: transport + protocol: TCP + readinessProbe: + tcpSocket: + port: 9200 + volumeMounts: + - mountPath: /usr/share/elasticsearch/conf/ + name: elasticsearch-conf + - mountPath: /usr/share/elasticsearch/data/ + name: elasticsearch-data + - mountPath: /usr/share/elasticsearch/logs/ + name: elasticsearch-logs + volumes: + - name: elasticsearch-data + persistentVolumeClaim: + claimName: elasticsearch-db + - name: elasticsearch-logs + hostPath: + path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/elasticsearch/logs + - name: elasticsearch-conf + configMap: + name: elasticsearch-configmap + items: + - key: elasticsearch.yml + path: elasticsearch.yml +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: elasticsearch-configmap + namespace: {{ .Values.nsPrefix }}-log +data: +{{ (.Files.Glob "resources/elasticsearch/conf/elasticsearch.yml").AsConfig | indent 2 }} \ No newline at end of file diff --git a/kubernetes/log/templates/kibana-deployment.yaml b/kubernetes/log/templates/kibana-deployment.yaml new file mode 100644 index 0000000000..f8070ef780 --- /dev/null +++ b/kubernetes/log/templates/kibana-deployment.yaml @@ -0,0 +1,71 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + labels: + app: kibana + name: kibana + namespace: {{ .Values.nsPrefix }}-log +spec: + selector: + matchLabels: + app: kibana + template: + metadata: + labels: + app: kibana + name: kibana + annotations: + pod.beta.kubernetes.io/init-containers: '[ + { + "args": [ + "--container-name", + "elasticsearch" + ], + "command": [ + "/root/ready.py" + ], + "env": [ + { + "name": "NAMESPACE", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.namespace" + } + } + } + ], + "image": "{{ .Values.image.readiness }}", + "imagePullPolicy": "{{ .Values.pullPolicy }}", + "name": "kibana-readiness" + } + ]' + spec: + containers: + - name: kibana + image: {{ .Values.image.kibana }} + ports: + - containerPort: 5601 + name: http + protocol: TCP + readinessProbe: + tcpSocket: + port: 5601 + volumeMounts: + - name: kibana-conf + mountPath: /usr/share/kibana/config/ + volumes: + - name: kibana-conf + configMap: + name: kibana-configmap + items: + - key: kibana.yml + path: kibana.yml +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: kibana-configmap + namespace: {{ .Values.nsPrefix }}-log +data: +{{ (.Files.Glob "resources/kibana/conf/kibana.yml").AsConfig | indent 2 }} \ No newline at end of file diff --git a/kubernetes/log/templates/log-pv-pvc.yaml b/kubernetes/log/templates/log-pv-pvc.yaml new file mode 100644 index 0000000000..7e51e4c525 --- /dev/null +++ b/kubernetes/log/templates/log-pv-pvc.yaml @@ -0,0 +1,30 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: elasticsearch-db + namespace: "{{ .Values.nsPrefix }}-log" + labels: + name: elasticsearch-db +spec: + capacity: + storage: 2Gi + accessModes: + - ReadWriteMany + persistentVolumeReclaimPolicy: Retain + hostPath: + path: /dockerdata-nfs/{{ .Values.nsPrefix }}/elasticsearch/data +--- +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: elasticsearch-db + namespace: "{{ .Values.nsPrefix }}-log" +spec: + accessModes: + - ReadWriteMany + resources: + requests: + storage: 2Gi + selector: + matchLabels: + name: elasticsearch-db diff --git a/kubernetes/log/templates/logstash-deployment.yaml b/kubernetes/log/templates/logstash-deployment.yaml new file mode 100644 index 0000000000..23d590690f --- /dev/null +++ b/kubernetes/log/templates/logstash-deployment.yaml @@ -0,0 +1,82 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + labels: + app: logstash + name: logstash + namespace: {{ .Values.nsPrefix }}-log +spec: + selector: + matchLabels: + app: logstash + template: + metadata: + labels: + app: logstash + name: logstash + annotations: + pod.beta.kubernetes.io/init-containers: '[ + { + "args": [ + "--container-name", + "elasticsearch" + ], + "command": [ + "/root/ready.py" + ], + "env": [ + { + "name": "NAMESPACE", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.namespace" + } + } + } + ], + "image": "{{ .Values.image.readiness }}", + "imagePullPolicy": "{{ .Values.pullPolicy }}", + "name": "logstash-readiness" + } + ]' + + spec: + containers: + - name: logstash + image: {{ .Values.image.logstash }} + ports: + - containerPort: 5044 + name: transport + protocol: TCP + readinessProbe: + tcpSocket: + port: 5044 + volumeMounts: + - mountPath: /usr/share/logstash/config/ + name: logstash-conf + - mountPath: /usr/share/logstash/pipeline/ + name: logstash-pipeline + volumes: + - name: logstash-conf + configMap: + name: logstash-configmap + items: + - key: logstash.yml + path: logstash.yml + - name: logstash-pipeline + configMap: + name: logstash-configmap + items: + - key: onap-pipeline.conf + path: onap-pipeline.conf + +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: logstash-configmap + namespace: {{ .Values.nsPrefix }}-log +data: +{{ (.Files.Glob "resources/logstash/conf/logstash.yml").AsConfig | indent 2 }} +{{ (.Files.Glob "resources/logstash/pipeline/onap-pipeline.conf").AsConfig | indent 2 }} diff --git a/kubernetes/log/values.yaml b/kubernetes/log/values.yaml new file mode 100644 index 0000000000..04418302b2 --- /dev/null +++ b/kubernetes/log/values.yaml @@ -0,0 +1,10 @@ +nsPrefix: onap +pullPolicy: Always +nodePortPrefix: 302 +image: + readiness: oomk8s/readiness-check:1.0.0 + logstash: docker.elastic.co/logstash/logstash:5.4.3 + kibana: docker.elastic.co/kibana/kibana:5.5.0 + elasticsearch: docker.elastic.co/elasticsearch/elasticsearch:5.5.0 + es_bb: busybox + diff --git a/kubernetes/oneclick/setenv.bash b/kubernetes/oneclick/setenv.bash index 4b0d9403ca..f39b555fdc 100644 --- a/kubernetes/oneclick/setenv.bash +++ b/kubernetes/oneclick/setenv.bash @@ -1,6 +1,6 @@ #!/bin/bash -HELM_APPS=('mso' 'message-router' 'sdnc' 'vid' 'robot' 'portal' 'policy' 'appc' 'aai' 'sdc' 'dcae') +HELM_APPS=('mso' 'message-router' 'sdnc' 'vid' 'robot' 'portal' 'policy' 'appc' 'aai' 'sdc' 'dcae' 'log') ONAP_DOCKER_REGISTRY=${ONAP_DOCKER_REGISTRY:-nexus3.onap.org:10001} ONAP_DOCKER_USER=${ONAP_DOCKER_USER:-docker} ONAP_DOCKER_PASS=${ONAP_DOCKER_PASS:-docker}