Skip to content

Commit

Permalink
Merge pull request #113 from ThilinaManamgoda/cert_issue
Browse files Browse the repository at this point in the history
configure log analyzer
  • Loading branch information
DilanUA authored Mar 28, 2018
2 parents 8810110 + 0555c78 commit d050162
Show file tree
Hide file tree
Showing 5 changed files with 299 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
<!-- Admin password for the API gateway.-->
<Password>${admin.password}</Password>
<!-- Endpoint URLs for the APIs hosted in this API gateway.-->
<GatewayEndpoint>http://api-manager:${http.nio.port},https://api-manager:${https.nio.port}</GatewayEndpoint>
<GatewayEndpoint>http://localhost:${http.nio.port},https://localhost:${https.nio.port}</GatewayEndpoint>
</Environment>
</Environments>
</APIGateway>
Expand Down Expand Up @@ -284,10 +284,10 @@
<!--This property is used to indicate how we do user name comparision for token generation https://wso2.org/jira/browse/APIMANAGER-2225-->
<CompareCaseInsensitively>true</CompareCaseInsensitively>
<DisplayURL>false</DisplayURL>
<URL>https://api-manager/store</URL>
<URL>https://localhost:${mgt.transport.https.port}/store</URL>

<!-- Server URL of the API Store. -->
<ServerURL>https://api-manager:${mgt.transport.https.port}${carbon.context}services/</ServerURL>
<ServerURL>https://localhost:${mgt.transport.https.port}${carbon.context}services/</ServerURL>
<!-- Admin username for API Store. -->
<Username>${admin.username}</Username>

Expand Down Expand Up @@ -317,7 +317,7 @@

<APIPublisher>
<DisplayURL>false</DisplayURL>
<URL>https://api-manager/publisher</URL>
<URL>https://localhost/publisher</URL>
<!-- This parameter specifies enabling the capability of setting API documentation level granular visibility levels.
By default any document associate with an API will have the same permissions set as the API.With enabling below
property,it will show two additional permission levels as visible only to all registered users in a particular
Expand Down Expand Up @@ -651,12 +651,12 @@
</ThrottlingConfigurations>
<WorkflowConfigurations>
<Enabled>false</Enabled>
<ServerUrl>https://localhost:9445/bpmn</ServerUrl>
<ServerUser>${admin.username}</ServerUser>
<ServerPassword>${admin.password}</ServerPassword>
<WorkflowCallbackAPI>https://localhost:${mgt.transport.https.port}/api/am/publisher/v0.10/workflows/update-workflow-status</WorkflowCallbackAPI>
<ServerUrl>https://localhost:9445/bpmn</ServerUrl>
<ServerUser>${admin.username}</ServerUser>
<ServerPassword>${admin.password}</ServerPassword>
<WorkflowCallbackAPI>https://localhost:${mgt.transport.https.port}/api/am/publisher/v0.11/workflows/update-workflow-status</WorkflowCallbackAPI>
<TokenEndPoint>https://localhost:${https.nio.port}/token</TokenEndPoint>
<DCREndPoint>https://localhost:${mgt.transport.https.port}/client-registration/v0.10/register</DCREndPoint>
<DCREndPoint>https://localhost:${mgt.transport.https.port}/client-registration/v0.11/register</DCREndPoint>
<DCREndPointUser>${admin.username}</DCREndPointUser>
<DCREndPointPassword>${admin.password}</DCREndPointPassword>
</WorkflowConfigurations>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@
This is will become part of the End Point Reference of the
services deployed on this server instance.
-->
<HostName>api-manager</HostName>
<!--<HostName>api-manager</HostName>-->

<!--
Host name to be used for the Carbon management console
-->
<MgtHostName>api-manager</MgtHostName>
<!--<MgtHostName>api-manager</MgtHostName>-->

<!--
The URL of the back end server. This is where the admin services are hosted and
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,220 @@
#
# Copyright (c) 2005-2015, WSO2 Inc. (http://wso2.com) 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.
#

##
# This is the log4j configuration file used by WSO2 AM
# =====================================================
#
# IMPORTANT : Please do not remove or change the names of any of the Appenders defined here.
# The layout pattern & log file can be changed using the WSO2 AM Management Console, and those
# settings will override the settings in this file.
##


# the root category is ERROR (applies for all 3rd party JARs etc) and will be logged to the
# LOG_APPENDER and the CONSOLE_APPENDER

log4j.rootLogger=ERROR, CARBON_CONSOLE, CARBON_LOGFILE, CARBON_MEMORY, CARBON_SYS_LOG, ERROR_LOGFILE, DAS_AGENT

log4j.logger.AUDIT_LOG=INFO, AUDIT_LOGFILE

log4j.category.org.apache.synapse=INFO
log4j.category.org.apache.synapse.transport=INFO
log4j.category.org.apache.axis2=INFO
log4j.category.org.apache.axis2.transport=INFO
log4j.logger.com.atomikos=INFO,ATOMIKOS
log4j.logger.org.quartz=WARN
log4j.logger.org.wso2=INFO
log4j.logger.org.wso2.carbon=INFO
#log4j.category.org.apache.synapse.transport.nhttp.util=DEBUG
#log4j.category.org.apache.http.impl.nio.reactor=DEBUG
#log4j.logger.org.wso2.carbon.utils.deployment.ComponentBuilder=DEBUG
#log4j.logger.org.wso2.carbon.utils.deployment.OSGiBundleDeployer=DEBUG
log4j.logger.org.apache.catalina=WARN
log4j.logger.org.apache.coyote=WARN
log4j.logger.org.apache.axis2.enterprise=FATAL
log4j.logger.de.hunsicker.jalopy.io=FATAL

# uncomment the following logs to see HTTP headers and messages
#log4j.logger.org.apache.synapse.transport.http.headers=DEBUG
#log4j.logger.org.apache.synapse.transport.http.wire=DEBUG

# qpid related logs for the message broker
log4j.logger.qpid=WARN
log4j.logger.org.apache.qpid=WARN
log4j.logger.org.apache.qpid.server.Main=INFO
log4j.logger.qpid.message=WARN
log4j.logger.qpid.message.broker.listening=INFO
log4j.logger.org.wso2.carbon.databridge.agent.thrift.AsyncDataPublisher=WARN

# The console appender is used to display general information at console
log4j.appender.CARBON_CONSOLE=org.wso2.carbon.utils.logging.appenders.CarbonConsoleAppender
log4j.appender.CARBON_CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CARBON_CONSOLE.layout.ConversionPattern=[%d{ISO8601}] %5p - %c{1} %m%n

# Configure the service logger at INFO level. Writes only run-time/mediation-time audit messages
log4j.category.SERVICE_LOGGER=INFO, SERVICE_APPENDER
log4j.additivity.SERVICE_LOGGER=false
log4j.appender.SERVICE_APPENDER=org.apache.log4j.RollingFileAppender
log4j.appender.SERVICE_APPENDER.File=${carbon.home}/repository/logs/${instance.log}/wso2-apigw-service${instance.log}.log
log4j.appender.SERVICE_APPENDER.MaxFileSize=1000KB
log4j.appender.SERVICE_APPENDER.MaxBackupIndex=10
log4j.appender.SERVICE_APPENDER.layout=org.apache.log4j.PatternLayout
log4j.appender.SERVICE_APPENDER.layout.ConversionPattern=%d{ISO8601} [%X{ip}-%X{host}] [%t] %5p %c{1} %m%n

# The trace logger dumps enough information @INFO level, but maybe pushed upto TRACE.
# Writes only run-time/mediation time tracing/debug messages for messages passing through trace
# enabled sequences, mediators and services. Enabling tracing on these has a performance impact
log4j.category.TRACE_LOGGER=INFO, TRACE_APPENDER, TRACE_MEMORYAPPENDER
log4j.additivity.TRACE_LOGGER=false
log4j.appender.TRACE_APPENDER=org.apache.log4j.DailyRollingFileAppender
log4j.appender.TRACE_APPENDER.File=${carbon.home}/repository/logs/${instance.log}/wso2-apigw-trace${instance.log}.log
log4j.appender.TRACE_APPENDER.Append=true
log4j.appender.TRACE_APPENDER.layout=org.apache.log4j.PatternLayout
log4j.appender.TRACE_APPENDER.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%X{ip}-%X{host}] [%t] %5p %c{1} %m%n

# The memory appender for trace logger
log4j.appender.TRACE_MEMORYAPPENDER=org.wso2.carbon.utils.logging.appenders.MemoryAppender
log4j.appender.TRACE_MEMORYAPPENDER.bufferSize=2000
log4j.appender.TRACE_MEMORYAPPENDER.layout=org.apache.log4j.PatternLayout
log4j.appender.TRACE_MEMORYAPPENDER.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%X{ip}-%X{host}] [%t] %5p %m%n

# CARBON_LOGFILE is set to be a DailyRollingFileAppender using a PatternLayout.
log4j.appender.CARBON_LOGFILE=org.wso2.carbon.utils.logging.appenders.CarbonDailyRollingFileAppender
# Log file will be overridden by the configuration setting in the DB
# This path should be relative to WSO2 Carbon Home
log4j.appender.CARBON_LOGFILE.File=${carbon.home}/repository/logs/${instance.log}/wso2carbon${instance.log}.log
log4j.appender.CARBON_LOGFILE.Append=true
log4j.appender.CARBON_LOGFILE.layout=org.wso2.carbon.utils.logging.TenantAwarePatternLayout
# ConversionPattern will be overridden by the configuration setting in the DB
log4j.appender.CARBON_LOGFILE.layout.ConversionPattern=TID: [%T] [%S] [%d] %P%5p {%c} - %x %m {%c}%n
log4j.appender.CARBON_LOGFILE.layout.TenantPattern=%U%@%D [%T] [%S]
log4j.appender.CARBON_LOGFILE.threshold=DEBUG

# The standard error log where all the warnings, errors and fatal errors will be logged
log4j.appender.ERROR_LOGFILE=org.apache.log4j.FileAppender
log4j.appender.ERROR_LOGFILE.File=${carbon.home}/repository/logs/${instance.log}/wso2-apigw-errors.log
log4j.appender.ERROR_LOGFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.ERROR_LOGFILE.layout.ConversionPattern=%d{ISO8601} [%X{ip}-%X{host}] [%t] %5p %c{1} %m%n
log4j.appender.ERROR_LOGFILE.threshold=WARN

# The memory appender for logging
log4j.appender.CARBON_MEMORY=org.wso2.carbon.logging.service.appender.CarbonMemoryAppender
log4j.appender.CARBON_MEMORY.bufferSize=2000
log4j.appender.CARBON_MEMORY.layout=org.wso2.carbon.utils.logging.TenantAwarePatternLayout
# ConversionPattern will be overridden by the configuration setting in the DB
log4j.appender.CARBON_MEMORY.layout.ConversionPattern=TID: [%T] [%S] [%d] %P%5p {%c} - %x %m {%c}%n
log4j.appender.CARBON_MEMORY.layout.TenantPattern=%U%@%D [%T] [%S]
log4j.appender.CARBON_MEMORY.columnList=%T,%S,%A,%d,%c,%p,%m,%H,%I,%Stacktrace
log4j.appender.CARBON_MEMORY.threshold=DEBUG

# LOGEVENT is set to be a LogEventAppender using a PatternLayout to send logs to LOGEVENT
log4j.appender.LOGEVENT=org.wso2.carbon.logging.appender.LogEventAppender
log4j.appender.LOGEVENT.url=tcp://localhost:7611
log4j.appender.LOGEVENT.layout=org.wso2.carbon.utils.logging.TenantAwarePatternLayout
log4j.appender.LOGEVENT.columnList=%T,%S,%A,%d,%c,%p,%m,%I,%Stacktrace
log4j.appender.LOGEVENT.userName=admin
log4j.appender.LOGEVENT.password=admin
log4j.appender.LOGEVENT.processingLimit=1000
log4j.appender.LOGEVENT.maxTolerableConsecutiveFailure=20


log4j.appender.CARBON_SYS_LOG = org.apache.log4j.net.SyslogAppender
log4j.appender.CARBON_SYS_LOG.layout=org.apache.log4j.PatternLayout
log4j.appender.CARBON_SYS_LOG.layout.ConversionPattern=[%d] %5p - %x %m {%c}%n
log4j.appender.CARBON_SYS_LOG.SyslogHost=localhost
log4j.appender.CARBON_SYS_LOG.Facility=USER
log4j.appender.CARBON_SYS_LOG.threshold=DEBUG

# LOGEVENT is set to be a LogEventAppender using a PatternLayout to send logs to LOGEVENT
log4j.appender.LOGEVENT=org.wso2.carbon.logging.appender.LogEventAppender
log4j.appender.LOGEVENT.url=tcp://localhost:7611
log4j.appender.LOGEVENT.layout=org.wso2.carbon.utils.logging.TenantAwarePatternLayout
log4j.appender.LOGEVENT.columnList=%T,%S,%A,%d,%c,%p,%m,%H,%I,%Stacktrace
log4j.appender.LOGEVENT.userName=admin
log4j.appender.LOGEVENT.password=admin

log4j.logger.org.apache.directory.shared.ldap=WARN, CARBON_CONSOLE
log4j.logger.org.apache.directory.server.ldap.handlers=WARN, CARBON_CONSOLE
log4j.logger.org.apache.directory.shared.ldap.entry.DefaultServerAttribute=FATAL, CARBON_CONSOLE
log4j.logger.org.apache.directory.shared.ldap.ldif.LdifReader=ERROR, CARBON_CONSOLE
log4j.logger.org.apache.directory.server.ldap.LdapProtocolHandler=ERROR, CARBON_CONSOLE

## Trace Logger configuration which will append to a XMPP chatroom or JID ##
#log4j.appender.XMPP_APPENDER=org.wso2.carbon.utils.logging.IMAppender
#log4j.appender.XMPP_APPENDER.host=jabber.org
#log4j.appender.XMPP_APPENDER.username=wso2esb
#log4j.appender.XMPP_APPENDER.password=wso2esb
#log4j.appender.XMPP_APPENDER.recipient=ruwan@jabber.org
#log4j.appender.XMPP_APPENDER.layout=org.apache.log4j.PatternLayout
#log4j.appender.XMPP_APPENDER.layout.ConversionPattern=[%X{host}] [%t] %-5p [%d{HH:mm:ss,SSS}] %C{1} - %m%n

# Appender config to AUDIT_LOGFILE
log4j.appender.AUDIT_LOGFILE=org.apache.log4j.DailyRollingFileAppender
log4j.appender.AUDIT_LOGFILE.File=${carbon.home}/repository/logs/audit.log
log4j.appender.AUDIT_LOGFILE.Append=true
log4j.appender.AUDIT_LOGFILE.layout=org.wso2.carbon.utils.logging.TenantAwarePatternLayout
log4j.appender.AUDIT_LOGFILE.layout.ConversionPattern=[%d] %P%5p - %x %m %n
log4j.appender.AUDIT_LOGFILE.layout.TenantPattern=%U%@%D [%T] [%S]
log4j.appender.AUDIT_LOGFILE.threshold=INFO
log4j.additivity.AUDIT_LOG=false

# Appender config to send Atomikos transaction logs to new log file tm.out.
log4j.appender.ATOMIKOS = org.apache.log4j.RollingFileAppender
log4j.appender.ATOMIKOS.File = repository/logs/tm.out
log4j.appender.ATOMIKOS.Append = true
log4j.appender.ATOMIKOS.layout = org.apache.log4j.PatternLayout
log4j.appender.ATOMIKOS.layout.ConversionPattern=%p %t %c - %m%n
log4j.additivity.com.atomikos=false

# DAS_AGENT is set to be a Custom Log Appender.
log4j.appender.DAS_AGENT=org.wso2.carbon.analytics.shared.data.agents.log4j.appender.LogEventAppender
# DAS_AGENT uses PatternLayout.
log4j.appender.DAS_AGENT.layout=org.wso2.carbon.analytics.shared.data.agents.log4j.util.TenantAwarePatternLayout
log4j.appender.DAS_AGENT.columnList=%D,%S,%A,%d,%c,%p,%m,%H,%I,%Stacktrace
log4j.appender.DAS_AGENT.userName=admin
log4j.appender.DAS_AGENT.password=admin
log4j.appender.DAS_AGENT.url=tcp://am-analytics:7612
log4j.appender.DAS_AGENT.maxTolerableConsecutiveFailure=5
log4j.appender.DAS_AGENT.streamDef=loganalyzer:1.0.0
log4j.logger.trace.messages=TRACE,CARBON_TRACE_LOGFILE

# Appender config to CARBON_TRACE_LOGFILE
log4j.appender.CARBON_TRACE_LOGFILE=org.apache.log4j.DailyRollingFileAppender
log4j.appender.CARBON_TRACE_LOGFILE.File=${carbon.home}/repository/logs/${instance.log}/wso2carbon-trace-messages${instance.log}.log
log4j.appender.CARBON_TRACE_LOGFILE.Append=true
log4j.appender.CARBON_TRACE_LOGFILE.layout=org.wso2.carbon.utils.logging.TenantAwarePatternLayout
log4j.appender.CARBON_TRACE_LOGFILE.layout.ConversionPattern=[%d] %P%5p {%c} - %x %m %n
log4j.appender.CARBON_TRACE_LOGFILE.layout.TenantPattern=%U%@%D [%T] [%S]
log4j.appender.CARBON_TRACE_LOGFILE.threshold=TRACE
log4j.additivity.trace.messages=false


# The event trace logger dumps enough information @INFO level, but maybe pushed upto TRACE.
# Writes only run-time/event processing time tracing/debug messages for event passing through trace
# enabled transport adapters event formatters, builders and processors. Enabling event tracing on these has a performance impact
log4j.category.EVENT_TRACE_LOGGER=INFO, EVENT_TRACE_APPENDER, EVENT_TRACE_MEMORYAPPENDER
log4j.additivity.EVENT_TRACE_LOGGER=false
log4j.appender.EVENT_TRACE_APPENDER=org.apache.log4j.DailyRollingFileAppender
log4j.appender.EVENT_TRACE_APPENDER.File=${carbon.home}/repository/logs/${instance.log}/wso2-cep-trace${instance.log}.log
log4j.appender.EVENT_TRACE_APPENDER.Append=true
log4j.appender.EVENT_TRACE_APPENDER.layout=org.apache.log4j.PatternLayout
log4j.appender.EVENT_TRACE_APPENDER.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%X{ip}-%X{host}] [%t] %5p %c{1} %m%n
# The memory appender for trace logger
log4j.appender.EVENT_TRACE_MEMORYAPPENDER=org.wso2.carbon.utils.logging.appenders.MemoryAppender
log4j.appender.EVENT_TRACE_MEMORYAPPENDER.bufferSize=2000
log4j.appender.EVENT_TRACE_MEMORYAPPENDER.layout=org.apache.log4j.PatternLayout
log4j.appender.EVENT_TRACE_MEMORYAPPENDER.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%X{ip}-%X{host}] [%t] %5p %m%n
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"store": {
"types": ["fs"]
},
"gadgetGeneration" :{
"isCreateGadgetEnable": false,
"ignoreProviders": ["rt"]
},
"authentication": {
"activeMethod": "basic",
"methods": {
"sso": {
"attributes": {
"issuer": "portal",
"identityProviderURL": "https://localhost:9443/samlsso",
"responseSigningEnabled": "false",
"acs": "https://localhost:9444/portal/acs",
"identityAlias": "wso2carbon",
"useTenantKey": false
}
},
"basic": {
"attributes": {}
}
}
},
"authorization": {
"activeMethod": "",
"methods": {
"oauth": {
"attributes": {
"idPServer": "%https.ip%/oauth2/token",
"dynamicClientProperties": {
"callbackUrl": "%https.ip%/portal",
"clientName": "portal",
"owner": "admin",
"applicationType": "JaggeryApp",
"grantType": "password refresh_token urn:ietf:params:oauth:grant-type:saml2-bearer",
"saasApp": false,
"dynamicClientRegistrationEndPoint": "%https.ip%/dynamic-client-web/register/",
"tokenScope": "Production"
}
}
}
}
},
"designers": [
"Internal/everyone"
],
"tenantPrefix": "/t",
"shareStore": false,
"theme": "basic",
"cacheTimeoutSeconds": "5",
"cacheSizeBytes": "1073741824",
"defaultDashboardRedirect": false,
"isCreateGadgetEnable": true,
"oauth": {
"username": "admin",
"password": "admin"
},
"host": {
"hostname": "am-analytics",
"port": "",
"protocol": ""
}
}
2 changes: 2 additions & 0 deletions docker-compose/APIM-ISasKM-with-Analytics/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ services:
- ./apim/repository/conf/tomcat/catalina-server.xml:/home/wso2carbon/wso2am-2.1.0/repository/conf/tomcat/catalina-server.xml
- ./apim/repository/conf/axis2/axis2.xml:/home/wso2carbon/wso2am-2.1.0/repository/conf/axis2/axis2.xml
- ./apim/bin/wso2server.sh:/home/wso2carbon/wso2am-2.1.0/bin/wso2server.sh
- ./apim/repository/deployment/server/jaggeryapps/portal/configs/designer.json:/home/wso2carbon/wso2am-2.1.0/repository/deployment/server/jaggeryapps/portal/configs/designer.json
- ./apim/repository/conf/log4j.properties:/home/wso2carbon/wso2am-2.1.0/repository/conf/log4j.properties
ports:
- "9763:9763"
- "9443:9443"
Expand Down

0 comments on commit d050162

Please sign in to comment.