diff options
Diffstat (limited to 'ajsc-aai/ajsc-shared-config')
5 files changed, 434 insertions, 0 deletions
diff --git a/ajsc-aai/ajsc-shared-config/README.txt b/ajsc-aai/ajsc-shared-config/README.txt new file mode 100644 index 0000000..a82eb64 --- /dev/null +++ b/ajsc-aai/ajsc-shared-config/README.txt @@ -0,0 +1,6 @@ +The ajsc-shared-config folder is included in the service project to provide the functionality of the AJSC_SHARED_CONFIG +location that will exist in CSI envs. This includes the logback.xml for logging configurations, and some csm related +artifacts necessary for proper functionality of the csm framework within the CSI env. Within the 2 profiles that can +be utilized to run the AJSC locally, "runLocal" and "runAjsc", the system propery, "AJSC_SHARED_CONFIG", has been set +to point to this directory. The files in this folder will NOT be copied/moved anywhere within the AJSC SWM package. These +files will already be in existence within the CSI env.
\ No newline at end of file diff --git a/ajsc-aai/ajsc-shared-config/etc/aft.properties b/ajsc-aai/ajsc-shared-config/etc/aft.properties new file mode 100644 index 0000000..b2f86bc --- /dev/null +++ b/ajsc-aai/ajsc-shared-config/etc/aft.properties @@ -0,0 +1,7 @@ +#Copyright (c) 2016 AT&T Intellectual Property. All rights reserved. +# Flow test 319 +# The DEFAULT setup for this file is for deployment to soa cloud node which will use the "bundleconfig/etc/spm2.jks" location +# For Testing Locally, you can set the system property, csiEnable=true, found within bundleconfig-local/etc/sysprops/sys-props.properties +# and switch com.att.aft.keyStore and com.att.aft.trustStore values commented out below to "ajsc-shared-config/etc/spm2.jks" + +#replace proper values for the dummy values. diff --git a/ajsc-aai/ajsc-shared-config/etc/basic-logback_root_logger_level_off.xml b/ajsc-aai/ajsc-shared-config/etc/basic-logback_root_logger_level_off.xml new file mode 100644 index 0000000..4ebe2db --- /dev/null +++ b/ajsc-aai/ajsc-shared-config/etc/basic-logback_root_logger_level_off.xml @@ -0,0 +1,87 @@ +<!-- + Copyright (c) 2016 AT&T Intellectual Property. All rights reserved. +--> +<configuration scan="true" scanPeriod="3 seconds" debug="true"> + <property name="logDirectory" value="${AJSC_HOME}/log" /> + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>ERROR</level> + </filter> + <encoder> + <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n + </pattern> + </encoder> + </appender> + + <appender name="INFO" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>DEBUG</level> + </filter> + <file>${logDirectory}/info_ajsc.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> + <fileNamePattern>${logDirectory}/info_ajsc.%i.log.zip + </fileNamePattern> + <minIndex>1</minIndex> + <maxIndex>9</maxIndex> + </rollingPolicy> + <triggeringPolicy + class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> + <maxFileSize>5MB</maxFileSize> + </triggeringPolicy> + <encoder> + <pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern> + </encoder> + </appender> + <appender name="ERROR" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>ERROR</level> + </filter> + <file>${logDirectory}/error_ajsc.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> + <fileNamePattern>${logDirectory}/error_ajsc.%i.log.zip + </fileNamePattern> + <minIndex>1</minIndex> + <maxIndex>9</maxIndex> + </rollingPolicy> + <triggeringPolicy + class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> + <maxFileSize>5MB</maxFileSize> + </triggeringPolicy> + <encoder> + <!-- <pattern>"%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n"</pattern> --> + <pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern> + </encoder> + </appender> + + <appender name="AJSC-AUDIT" class="ch.qos.logback.classic.net.SyslogAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>INFO</level> + </filter> + <syslogHost>localhost</syslogHost> + <facility>USER</facility> + <!-- Note the colon character below - it is important part of "TAG" message + format You need a colon to determine where the TAG field ends and the CONTENT + begins --> + <suffixPattern>AJSC_AUDIT: [%thread] [%logger] %msg</suffixPattern> + </appender> + <appender name="CONTROLLER-AUDIT" class="ch.qos.logback.classic.net.SyslogAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>INFO</level> + </filter> + <syslogHost>localhost</syslogHost> + <facility>USER</facility> + <!-- Note the colon character below - it is important part of "TAG" message + format You need a colon to determine where the TAG field ends and the CONTENT + begins --> + <suffixPattern>AJSC_AUDIT: [%thread] [%logger] mdc:[%mdc] %msg + </suffixPattern> + </appender> + + <root level="off"> + <appender-ref ref="ERROR" /> + <appender-ref ref="INFO" /> + <appender-ref ref="STDOUT" /> + </root> +</configuration> diff --git a/ajsc-aai/ajsc-shared-config/etc/localhost-access-logback.xml b/ajsc-aai/ajsc-shared-config/etc/localhost-access-logback.xml new file mode 100644 index 0000000..9401a9f --- /dev/null +++ b/ajsc-aai/ajsc-shared-config/etc/localhost-access-logback.xml @@ -0,0 +1,38 @@ +<configuration> + <appender name="ACCESS" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${AJSC_HOME}/logs/ajsc-jetty/localhost_access.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${AJSC_HOME}/logs/ajsc-jetty/localhost_access.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.openecomp.aai.util.CustomLogPatternLayoutEncoder"> + <Pattern>%a %u %z [%t] "%m %U" %s %b %y</Pattern> + </encoder> + </appender> + <appender-ref ref="ACCESS" /> +</configuration> + +<!-- +%a - Remote IP address +%A - Local IP address +%b - Bytes sent, excluding HTTP headers, or '-' if no bytes were sent +%B - Bytes sent, excluding HTTP headers +%h - Remote host name +%H - Request protocol +%l - Remote logical username from identd (always returns '-') +%m - Request method +%p - Local port +%q - Query string (prepended with a '?' if it exists, otherwise an empty string +%r - First line of the request +%s - HTTP status code of the response +%S - User session ID +%t - Date and time, in Common Log Format format +%u - Remote user that was authenticated +%U - Requested URL path +%v - Local server name +%I - current request thread name (can compare later with stacktraces) + +%z - Custom pattern that parses the cert for the subject +%y - Custom pattern determines rest or dme2 + -->
\ No newline at end of file diff --git a/ajsc-aai/ajsc-shared-config/etc/logback.xml b/ajsc-aai/ajsc-shared-config/etc/logback.xml new file mode 100644 index 0000000..103f38f --- /dev/null +++ b/ajsc-aai/ajsc-shared-config/etc/logback.xml @@ -0,0 +1,296 @@ +<configuration scan="true" scanPeriod="60 seconds" debug="false"> + <contextName>${module.ajsc.namespace.name}</contextName> + <jmxConfigurator /> + <property name="logDirectory" value="${AJSC_HOME}/logs" /> + + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>ERROR</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <encoder> + <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n</pattern> + </encoder> + </appender> + + <appender name="METRIC" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>INFO</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <file>${logDirectory}/rest/metrics.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/metrics.log.%d{yyyy-MM-dd}</fileNamePattern> + </rollingPolicy> + <encoder> + <pattern>%m%n</pattern> + </encoder> + </appender> + <appender name="asyncMETRIC" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <appender-ref ref="METRIC" /> + </appender> + + <appender name="DEBUG" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>DEBUG</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <file>${logDirectory}/rest/debug.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/debug.log.%d{yyyy-MM-dd}</fileNamePattern> + </rollingPolicy> + <encoder> + <pattern>%m%n</pattern> + </encoder> + </appender> + <appender name="asyncDEBUG" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <appender-ref ref="DEBUG" /> + </appender> + + <appender name="ERROR" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>WARN</level> + </filter> + <file>${logDirectory}/rest/error.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/error.log.%d{yyyy-MM-dd}</fileNamePattern> + </rollingPolicy> + <encoder> + <pattern>%m%n</pattern> + </encoder> + </appender> + <appender name="asyncERROR" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <appender-ref ref="ERROR" /> + </appender> + + <appender name="AUDIT" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDirectory}/rest/audit.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/audit.log.%d{yyyy-MM-dd}</fileNamePattern> + </rollingPolicy> + <encoder> + <pattern>%m%n</pattern> + </encoder> + </appender> + <appender name="asyncAUDIT" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <appender-ref ref="AUDIT" /> + </appender> + + <appender name="dmaapAAIWorkloadConsumer" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>WARN</level> + </filter> + <File>${logDirectory}/dmaapAAIWorkloadConsumer/error.log</File> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/dmaapAAIWorkloadConsumer/error.log.%d{yyyy-MM-dd}</fileNamePattern> + </rollingPolicy> + <encoder> + <pattern>%m%n</pattern> + </encoder> + </appender> + + <appender name="dmaapAAIWorkloadConsumerdebug" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>DEBUG</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <File>${logDirectory}/dmaapAAIWorkloadConsumer/debug.log</File> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/dmaapAAIWorkloadConsumer/debug.log.%d{yyyy-MM-dd}</fileNamePattern> + </rollingPolicy> + <encoder> + <pattern>%m%n</pattern> + </encoder> + </appender> + <appender name="dmaapAAIWorkloadConsumermetric" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>INFO</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <File>${logDirectory}/dmaapAAIWorkloadConsumer/metrics.log</File> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/dmaapAAIWorkloadConsumer/metrics.log.%d{yyyy-MM-dd}</fileNamePattern> + </rollingPolicy> + <encoder> + <pattern>%m%n</pattern> + </encoder> + </appender> + + <!-- Spring related loggers --> + <logger name="org.springframework" level="WARN" /> + <logger name="org.springframework.beans" level="WARN" /> + <logger name="org.springframework.web" level="WARN" /> + <logger name="com.blog.spring.jms" level="WARN" /> + + <!-- AJSC Services (bootstrap services) --> + <logger name="ajsc" level="WARN" /> + <logger name="ajsc.RouteMgmtService" level="WARN" /> + <logger name="ajsc.ComputeService" level="WARN" /> + <logger name="ajsc.VandelayService" level="WARN" /> + <logger name="ajsc.FilePersistenceService" level="WARN" /> + <logger name="ajsc.UserDefinedJarService" level="WARN" /> + <logger name="ajsc.UserDefinedBeansDefService" level="WARN" /> + <logger name="ajsc.LoggingConfigurationService" level="WARN" /> + + <!-- AJSC related loggers (DME2 Registration, csi logging, restlet, servlet logging) --> + <logger name="ajsc.utils" level="WARN" /> + <logger name="ajsc.utils.DME2Helper" level="WARN" /> + <logger name="ajsc.filters" level="WARN" /> + <logger name="ajsc.beans.interceptors" level="WARN" /> + <logger name="ajsc.restlet" level="WARN" /> + <logger name="ajsc.servlet" level="WARN" /> + <logger name="com.att.ajsc" level="WARN" /> + + <!-- Other Loggers that may help troubleshoot --> + <logger name="net.sf" level="WARN" /> + <logger name="org.apache.commons.httpclient" level="WARN" /> + <logger name="org.apache.commons" level="WARN" /> + <logger name="org.apache.coyote" level="WARN" /> + <logger name="org.apache.jasper" level="WARN" /> + + <!-- Camel Related Loggers (including restlet/servlet/jaxrs/cxf logging. May aid in troubleshooting) --> + <logger name="org.apache.camel" level="WARN" /> + <logger name="org.apache.cxf" level="WARN" /> + <logger name="org.apache.camel.processor.interceptor" level="WARN" /> + <logger name="org.apache.cxf.jaxrs.interceptor" level="WARN" /> + <logger name="org.apache.cxf.service" level="WARN" /> + <logger name="org.restlet" level="WARN" /> + <logger name="org.apache.camel.component.restlet" level="WARN" /> + + <!-- logback internals logging --> + <logger name="ch.qos.logback.classic" level="WARN" /> + <logger name="ch.qos.logback.core" level="WARN" /> + + <!-- logback jms appenders & loggers definition starts here --> + <appender name="auditLogs" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"/> + <file>${logDirectory}/perf-audit/Audit-${lrmRVer}-${lrmRO}-${Pid}.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> + <fileNamePattern>${logDirectory}/perf-audit/Audit-${lrmRVer}-${lrmRO}-${Pid}.%i.log.zip</fileNamePattern> + <minIndex>1</minIndex> + <maxIndex>9</maxIndex> + </rollingPolicy> + <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> + <maxFileSize>5MB</maxFileSize> + </triggeringPolicy> + <encoder> + <pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern> + </encoder> + </appender> + <appender name="perfLogs" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"/> + <file>${logDirectory}/perf-audit/Perform-${lrmRVer}-${lrmRO}-${Pid}.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> + <fileNamePattern>${logDirectory}/perf-audit/Perform-${lrmRVer}-${lrmRO}-${Pid}.%i.log.zip</fileNamePattern> + <minIndex>1</minIndex> + <maxIndex>9</maxIndex> + </rollingPolicy> + <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> + <maxFileSize>5MB</maxFileSize> + </triggeringPolicy> + <encoder> + <pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern> + </encoder> + </appender> +<!-- <if condition='property("JMS_BROKER").contains("WMQ")'> + <then> + <appender name="Audit-Record-Queue" class="ajsc.JMSQueueAppender"> + <param name="InitialContextFactoryName" value="${JMS_WMQ_INITIAL_CONNECTION_FACTORY_NAME}" /> + <param name="ProviderURL" value="${JMS_WMQ_PROVIDER_URL}" /> + <param name="DestinationName" value="${JMS_WMQ_AUDIT_DESTINATION_NAME}" /> + <param name="ConnectionFactoryName" value="${JMS_WMQ_CONNECTION_FACTORY_NAME}" /> + </appender> + <appender name="Performance-Tracker-Queue" class="ajsc.JMSQueueAppender"> + <param name="InitialContextFactoryName" value="${JMS_WMQ_INITIAL_CONNECTION_FACTORY_NAME}" /> + <param name="ProviderURL" value="${JMS_WMQ_PROVIDER_URL}" /> + <param name="DestinationName" value="${JMS_WMQ_PERF_DESTINATION_NAME}" /> + <param name="ConnectionFactoryName" value="${JMS_WMQ_CONNECTION_FACTORY_NAME}" /> + </appender> + </then> + <else> --> + <!-- logback jms appenders definition starts here --> +<!-- <appender name="Audit-Record-Queue" class="ajsc.JMSQueueAppender"> + <param name="InitialContextFactoryName" value="com.tibco.tibjms.naming.TibjmsInitialContextFactory" /> + <param name="ProviderURL" value="${JMS_TIBCO_PROVIDER_URL}" /> + <param name="userName" value="${JMS_LOGGER_USER_NAME}" /> + <param name="password" value="${JMS_LOGGER_PASSWORD}" /> + <QueueBindingName>${JMS_LOGGER_AUDIT_QUEUE_BINDING}</QueueBindingName> + </appender> + <appender name="Performance-Tracker-Queue" class="ajsc.JMSQueueAppender"> + <param name="InitialContextFactoryName" value="com.tibco.tibjms.naming.TibjmsInitialContextFactory" /> + <param name="ProviderURL" value="${JMS_TIBCO_PROVIDER_URL}" /> + <param name="userName" value="${JMS_LOGGER_USER_NAME}" /> + <param name="password" value="${JMS_LOGGER_PASSWORD}" /> + <QueueBindingName>${JMS_LOGGER_PERF_QUEUE_BINDING}</QueueBindingName> + </appender> + </else> + </if> --> + <appender name="ASYNC-audit" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <discardingThreshold>0</discardingThreshold> + <appender-ref ref="Audit-Record-Queue" /> + </appender> + <logger name="AuditRecord" level="INFO" additivity="false"> + <appender-ref ref="ASYNC-audit" /> + <appender-ref ref="auditLogs" /> + </logger> + <logger name="AuditRecord_DirectCall" level="INFO" additivity="false"> + <appender-ref ref="ASYNC-audit" /> + <appender-ref ref="auditLogs" /> + </logger> + <appender name="ASYNC-perf" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <discardingThreshold>0</discardingThreshold> + <appender-ref ref="Performance-Tracker-Queue" /> + </appender> + <logger name="PerfTrackerRecord" level="INFO" additivity="false"> + <appender-ref ref="ASYNC-perf" /> + <appender-ref ref="perfLogs" /> + </logger> + <!-- logback jms appenders & loggers definition ends here --> + + <logger name="org.openecomp.aai.dmaap" level="DEBUG" additivity="false"> + <appender-ref ref="dmaapAAIWorkloadConsumer" /> + <appender-ref ref="dmaapAAIWorkloadConsumerdebug" /> + <appender-ref ref="dmaapAAIWorkloadConsumermetric" /> + </logger> + + <logger name="org.openecomp.aai" level="INFO" additivity="false"> + <appender-ref ref="asyncDEBUG" /> + <appender-ref ref="asyncERROR" /> + <appender-ref ref="asyncMETRIC" /> + </logger> + <logger name="org.openecomp.aai.AUDITLOGGER" level="INFO" additivity="false"> + <appender-ref ref="asyncAUDIT" /> + </logger> + + <logger name="org.apache" level="WARN" /> + <logger name="org.zookeeper" level="WARN" /> + <logger name="com.thinkaurelius" level="WARN" /> + + <!-- ============================================================================ --> + <!-- General EELF logger --> + <!-- ============================================================================ --> + <logger name="com.att.eelf" level="WARN" additivity="false"> + <appender-ref ref="asyncDEBUG" /> + <appender-ref ref="asyncERROR" /> + <appender-ref ref="asyncMETRIC" /> + <appender-ref ref="asyncAUDIT" /> + </logger> + + <root level="WARN"> + <appender-ref ref="asyncDEBUG" /> + <appender-ref ref="asyncERROR" /> + <appender-ref ref="asyncMETRIC" /> + <appender-ref ref="asyncAUDIT" /> + </root> +</configuration>
\ No newline at end of file |