From 8f61e18ef0457745719f05bd5c186992a7155416 Mon Sep 17 00:00:00 2001 From: Jorge Hernandez Date: Thu, 22 Jun 2017 17:17:28 -0500 Subject: [POLICY-30] remove problematic layers add configurability through telemetry API Change-Id: I77ebde12a417d421b98646c32dc74824f4494c2e Signed-off-by: Jorge Hernandez --- .../server/config/controller.properties.README | 172 ----------- .../src/main/server/config/log4j.properties | 48 ---- .../src/main/server/config/logback.xml | 316 +++++++++------------ policy-management/src/main/server/config/makefile | 9 - .../src/main/server/config/policyLogger.properties | 49 ---- .../src/main/server/config/system.properties | 14 +- 6 files changed, 144 insertions(+), 464 deletions(-) delete mode 100644 policy-management/src/main/server/config/controller.properties.README delete mode 100644 policy-management/src/main/server/config/log4j.properties delete mode 100644 policy-management/src/main/server/config/makefile delete mode 100644 policy-management/src/main/server/config/policyLogger.properties (limited to 'policy-management/src/main/server/config') diff --git a/policy-management/src/main/server/config/controller.properties.README b/policy-management/src/main/server/config/controller.properties.README deleted file mode 100644 index e5a049c1..00000000 --- a/policy-management/src/main/server/config/controller.properties.README +++ /dev/null @@ -1,172 +0,0 @@ -### -# ============LICENSE_START======================================================= -# ONAP POLICY -# ================================================================================ -# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. -# ================================================================================ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============LICENSE_END========================================================= -### -# -# *-controller.properties configuration -# -# -# The -controller.properties file define the -# configuration aspects of a give controller at initialization time. -# -# It contains 3 major sections: -# -# 1. CONTROLLER -# 2. DMAAP -# 4. UEB -# 5. DROOLS -# -# 1. CONTROLLER -# -# controller.name: controller unique name identifier. -# -# 2. DMAAP: -# 2.1. DMAAP Sources Information -# 2.1.1. Topics that this controller supports over DMAAP. -# 2.1.1. DMAAP Network Information for each topic. -# 2.1.2. Decoders information for each topic to map network input to -# an object that will be injected into its appropriate drools -# sessions. -# 2.1.3. Filtering information for each decoder, to filter out from -# drools, messages that should not be processed. -# 2.2. DMAAP Sinks Information -# 2.2.1. Topics that this controller supports over DMAAP. -# 2.2.2. DMAAP Network Information for each topic. -# 2.2.3. Encoders information for each topic to map a model object -# to serialize network output that will be send over the -# appropriate DMAAP topic according to its network information. -# -# 2.1 DMAAP Sources -# -# dmaap.source.topics: comma separated list of DMAAP topics source of events. -# dmaap.source.topics..servers: comma separated list of DMAAP servers to poll for events. -# [optional] dmaap.source.topics..apiKey= : api key -# [optional] dmaap.source.topics..apiSecret= : api secret -# [optional] dmaap.source.topics..consumerGroup= : consumer group -# [optional] dmaap.source.topics..consumerInstance= : consumer instance -# dmaap.source.topics..events: comma separated list of classes to which an event can be mapped to, -# where must be declared in dmaap.source.topics -# [optional] dmaap.source.topics..events..filter: comma separated list of conditions in the form of -# pairs of "=" values, where identifies a field of the event, and -# is a regular expression that that field's value in the event must match -# against each particular instantiation of the event for this controller. Note that multiple -# "=" are evaluated for acceptance by AND'ing each condition. -# Further, must be declared in dmaap.source.topics, and -# in dmaap.source.topics..events. -# [optional] dmaap.source.topics..events.custom.gson: comma separated pair, where the first item -# is a class in the model that contains a gson parser, and the second is the actual gson parser in -# the class. This setting overrides the PDP-D generic framework parsers with an specific model -# provided one -# [optional] dmaap.source.topics..events.custom.jackson: comma separated pair, where the first item -# is a class in the model that contains a jackson parser, and the second is the actual jackson parser in -# the class. This setting overrides the PDP-D generic framework parsers with an specific model -# provided one -# -# 2.2 DMAAP Sinks -# -# dmaap.sink.topics: comma separated list of DMAAP topics destination of locally produced events. -# dmaap.sink.topics..servers: comma separated list of DMAAP servers to send events. -# [optional] dmaap.sink.topics..apiKey= : api key -# [optional] dmaap.sink.topics..apiSecret= : api secret -# [optional] dmaap.sink.topics..partitionKey= : partition key -# dmaap.sink.topics..events: comma separated list of classes to which an event can be mapped to, -# where must be declared in dmaap.sink.topics -# [optional] dmaap.sink.topics..events.custom.gson: comma separated pair, where the first item -# is a class in the model that contains a gson parser, and the second is the actual gson parser in -# the class. This setting overrides the PDP-D generic framework parsers with an specific model -# provided one -# [optional] dmaap.sink.topics..events.custom.jackson: comma separated pair, where the first item -# is a class in the model that contains a jackson parser, and the second is the actual jackson parser in -# the class. This setting overrides the PDP-D generic framework parsers with an specific model -# provided one -# -# 2. UEB: -# 2.1. UEB Sources Information -# 2.1.1. Topics that this controller supports over UEB. -# 2.1.1. UEB Network Information for each topic. -# 2.1.2. Decoders information for each topic to map network input to -# an object that will be injected into its appropriate drools -# sessions. -# 2.1.3. Filtering information for each decoder, to filter out from -# drools, messages that should not be processed. -# 2.2. UEB Sinks Information -# 2.2.1. Topics that this controller supports over UEB. -# 2.2.2. UEB Network Information for each topic. -# 2.2.3. Encoders information for each topic to map a model object -# to serialize network output that will be send over the -# appropriate UEB topic according to its network information. -# -# -# 2.1 UEB Sources -# -# ueb.source.topics: comma separated list of UEB topics source of events. -# ueb.source.topics..servers: comma separated list of UEB servers to poll for events. -# [optional] ueb.source.topics..apiKey= : api key -# [optional] ueb.source.topics..apiSecret= : api secret -# [optional] ueb.source.topics..consumerGroup= : consumer group -# [optional] ueb.source.topics..consumerInstance= : consumer instance -# ueb.source.topics..events: comma separated list of classes to which an event can be mapped to, -# where must be declared in ueb.source.topics -# ueb.source.topics..events..filter: comma separated list of conditions in the form of -# pairs of "=" values, where identifies a field of the event, and -# is a regular expression that that field's value in the event must match -# against each particular instantiation of the event for this controller. Note that multiple -# "=" are evaluated for acceptance by AND'ing each condition. -# Further, must be declared in ueb.source.topics, and -# in ueb.source.topics..events -# ueb.source.topics..events: comma separated list of classes to which an event can be mapped to, -# where must be declared in dmaap.source.topics -# [optional] ueb.source.topics..events..filter: comma separated list of conditions in the form of -# pairs of "=" values, where identifies a field of the event, and -# is a regular expression that that field's value in the event must match -# against each particular instantiation of the event for this controller. Note that multiple -# "=" are evaluated for acceptance by AND'ing each condition. -# Further, must be declared in dmaap.source.topics, and -# in dmaap.source.topics..events. -# [optional] ueb.source.topics..events.custom.gson: comma separated pair, where the first item -# is a class in the model that contains a gson parser, and the second is the actual gson parser in -# the class. This setting overrides the PDP-D generic framework parsers with an specific model -# provided one -# [optional] ueb.source.topics..events.custom.jackson: comma separated pair, where the first item -# is a class in the model that contains a jackson parser, and the second is the actual jackson parser in -# the class. This setting overrides the PDP-D generic framework parsers with an specific model -# provided one -# -# 2.1 UEB Sinks -# -# ueb.sink.topics: comma separated list of UEB topics destination of locally produced events. -# ueb.sink.topics..servers: comma separated list of UEB servers to send events. -# [optional] ueb.sink.topics..apiKey= : api key -# [optional] ueb.sink.topics..apiSecret= : api secret -# [optional] ueb.sink.topics..partitionKey= : partition key -# ueb.sink.topics..events: comma separated list of classes to which an event can be mapped to, -# where must be declared in ueb.sink.topics -# [optional] ueb.sink.topics..events.custom.gson: comma separated pair, where the first item -# is a class in the model that contains a gson parser, and the second is the actual gson parser in -# the class. This setting overrides the PDP-D generic framework parsers with an specific model -# provided one -# [optional] ueb.sink.topics..events.custom.jackson: comma separated pair, where the first item -# is a class in the model that contains a jackson parser, and the second is the actual jackson parser in -# the class. This setting overrides the PDP-D generic framework parsers with an specific model -# provided one -# -# 3. DROOLS (Maven Group Coordinates): -# -# rules.groupId: maven group id of rules jar file -# rules.artifactId: maven artifact id of rules jar file -# rules.version: comma separated list of versions supported and detected that include the drl. diff --git a/policy-management/src/main/server/config/log4j.properties b/policy-management/src/main/server/config/log4j.properties deleted file mode 100644 index 6ad25643..00000000 --- a/policy-management/src/main/server/config/log4j.properties +++ /dev/null @@ -1,48 +0,0 @@ -### -# ============LICENSE_START======================================================= -# policy-management -# ================================================================================ -# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. -# ================================================================================ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============LICENSE_END========================================================= -### - -log4j.rootLogger=INFO,stdout - -log4j.logger.org.apache.http.headers=INFO,stdout -log4j.logger.org.apache.http.wire=INFO,stdout -log4j.logger.networkLogger=INFO,network - -log4j.additivity.networkLogger=false - -log4j.appender.stdout=org.apache.log4j.RollingFileAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%d %5p [%t] %m %C:%L%n - -log4j.appender.network=org.apache.log4j.RollingFileAppender -log4j.appender.network.File=logs/network.log -log4j.appender.network.layout=org.apache.log4j.PatternLayout -log4j.appender.network.layout.ConversionPattern=[%d|%t]%m%n%n -log4j.appender.network.MaxFileSize=50MB -log4j.appender.network.MaxBackupIndex=4 - -log4j.logger.debugLogger=INFO,debug -log4j.additivity.debugLogger=false -log4j.appender.debug=org.apache.log4j.RollingFileAppender -log4j.appender.debug.File=logs/debug.log -log4j.appender.debug.layout=org.apache.log4j.PatternLayout -log4j.appender.debug.layout.ConversionPattern=[%d|%t]%m%n%n -log4j.appender.debug.MaxFileSize=50MB -log4j.appender.debug.MaxBackupIndex=4 - diff --git a/policy-management/src/main/server/config/logback.xml b/policy-management/src/main/server/config/logback.xml index 6b016206..58092cc2 100644 --- a/policy-management/src/main/server/config/logback.xml +++ b/policy-management/src/main/server/config/logback.xml @@ -18,194 +18,140 @@ ============LICENSE_END========================================================= --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${defaultPattern} - - + - - - + - - - + + + + + - - - - - ${logDirectory}/${auditLogName}.log - - ${logDirectory}/${auditLogName}.%i.log.zip - - 1 - 9 - - - 5MB - - - ${defaultAuditPattern} - - - - 256 - - + + + - - ${logDirectory}/${metricsLogName}.log - - ${logDirectory}/${metricsLogName}.%i.log.zip - - 1 - 9 - - - 5MB - - - - ${defaultMetricPattern} - - - - - - 256 - - - - - ${logDirectory}/${errorLogName}.log - - ${logDirectory}/${errorLogName}.%i.log.zip - - 1 - 9 - - - ERROR - - - 5MB - - - ${defaultErrorPattern} - - - - - 256 - - - - - ${debugLogDirectory}/${debugLogName}.log - - ${debugLogDirectory}/${debugLogName}.%i.log.zip - - 1 - 9 - - - INFO - - - 5MB - - - ${debugLoggerPattern} - - - - - 256 - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + ${logDir}/${auditLog}.log + + ${logDir}/${auditLog}.%i.log.zip + 1 + 9 + + + 5MB + + + ${auditPattern} + + + + + + + + + ${logDir}/${metricLog}.log + + ${logDir}/${metricLog}.%i.log.zip + 1 + 9 + + + 5MB + + + ${metricPattern} + + + + + + + + + ${logDir}/${errorLog}.log + + ${logDir}/${errorLog}.%i.log.zip + 1 + 9 + + + WARN + + + 15MB + + + ${errorPattern} + + + + + + + + + ${logDir}/${debugLog}.log + + ${logDir}/${debugLog}.%i.log.zip + 1 + 9 + + + 20MB + + + ${debugPattern} + + + + + + + + + ${logDir}/${networkLog}.log + + logs/network.log.%i.zip + 1 + 9 + + + 15MB + + + ${networkPattern} + + + + + + + + + + + + + + + + + + + + + + + diff --git a/policy-management/src/main/server/config/makefile b/policy-management/src/main/server/config/makefile deleted file mode 100644 index 5a96c541..00000000 --- a/policy-management/src/main/server/config/makefile +++ /dev/null @@ -1,9 +0,0 @@ - -restart: stop start - -start: - bin/policy-management-controller start -stop: - bin/policy-management-controller stop -console: - bin/policy-management-controller console diff --git a/policy-management/src/main/server/config/policyLogger.properties b/policy-management/src/main/server/config/policyLogger.properties deleted file mode 100644 index 4a977992..00000000 --- a/policy-management/src/main/server/config/policyLogger.properties +++ /dev/null @@ -1,49 +0,0 @@ -### -# ============LICENSE_START======================================================= -# policy-management -# ================================================================================ -# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. -# ================================================================================ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============LICENSE_END========================================================= -### - -################################### Set concurrentHashMap and timer info ####################### -#Timer initial delay and the delay between in milliseconds before task is to be execute. -timer.delay.time=1000 -#Timer scheduleAtFixedRate period - time in milliseconds between successive task executions. -check.interval= 30000 -#Longest time an event info can be stored in the concurrentHashMap for logging - in seconds. -event.expired.time=86400 -#Size of the concurrentHashMap which stores the event starting time, etc - when its size reaches this limit, the Timer gets executed -#to remove all expired records from this concurrentHashMap. -concurrentHashMap.limit=5000 -#Size of the concurrentHashMap - when its size drops to this point, stop the Timer -stop.check.point=2500 -################################### Set logging format ############################################# -# set EELF for EELF logging format, set LOG4J for using log4j, set SYSTEMOUT for using system.out.println -logger.type=EELF -#################################### Set level for EELF or SYSTEMOUT logging ################################## -# Set level for debug file. Set DEBUG to enable .info, .warn and .debug; set INFO for enable .info and .warn; set OFF to disable all -# Set override flag. Set TRUE for override the level setups in logback.xml. Set FALSE for using the level setups of logback.xml -override.logback.level.setup=FALSE -debugLogger.level=INFO -# Set level for metrics file. Set OFF to disable; set ON to enable -metricsLogger.level=ON -# Set level for error file. Set OFF to disable; set ON to enable -error.level=ON -# Set level for audit file. Set OFF to disable; set ON to enable -audit.level=ON -#################################### Set Policy Component ################################## -# Set DROOLS for drools PDP. Set XACML to xacml PDP -policy.component=DROOLS diff --git a/policy-management/src/main/server/config/system.properties b/policy-management/src/main/server/config/system.properties index feffbd00..67294c8a 100644 --- a/policy-management/src/main/server/config/system.properties +++ b/policy-management/src/main/server/config/system.properties @@ -20,12 +20,24 @@ # system properties passed to controller -# start JMX server port +# jmx + com.sun.management.jmxremote.port = 9991 com.sun.management.jmxremote.authenticate = false com.sun.management.jmxremote.ssl = false +# certs + javax.net.ssl.keyStore=/opt/app/policy/etc/ssl/policy-keystore javax.net.ssl.keyStorePassword = ${{KEYSTORE_PASSWD}} javax.net.ssl.trustStore=/opt/app/policy/etc/ssl/policy-keystore javax.net.ssl.trustStorePassword = ${{KEYSTORE_PASSWD}} + +# standard logging + +logback.configurationFile=config/logback.xml + +# eelf logging + +com.att.eelf.logging.path=config +com.att.eelf.logging.file=logback.xml \ No newline at end of file -- cgit 1.2.3-korg