Stratos provides centralized logging. The Python Cartridge Agent (PCA) can be configured to publish log events to a monitoring server. Any Thrift receiver can be used as the publishing endpoint for Log publishing, e.g. WSO2 Business Activity Monitor (BAM).
Set the following parameters in the <STRATOS_SOURCE_HOME>/products/python-cartridge-agent/target/<apache-stratos-python-cartridge-agent-version>/agent.conf
configuration file, to enable logging. This actives the LogPublisher job, which in-turn will scan the specified logs every second (1 sec), and publish each entry as a Thrift event to the specified Thrift receiver.
enable.data.publisher =ENABLE-DATA-PUBLISHER monitoring.server.ip =MONITORING-SERVER-IP monitoring.server.port =MONITORING-SERVER-PORT monitoring.server.secure.port =MONITORING-SERVER-SECURE-PORT monitoring.server.admin.username =MONITORING-SERVER-ADMIN-USERNAME monitoring.server.admin.password =MONITORING-SERVER-ADMIN-PASSWORD log.file.paths =LOG_FILE_PATHS
For example:
The following is a sample configuration when enabling logging in Stratos with WSO2 Business Activity Monitor (BAM) as the monitoring server.
enable.data.publisher =true monitoring.server.ip =localhost monitoring.server.port =7611 monitoring.server.secure.port =7711 monitoring.server.admin.username =admin monitoring.server.admin.password =admin log.file.paths =/home/kim/dev/wso2esb-4.8.1/repository/logs/wso2carbon.log