MT-Logging with WSO2 BAM



                         Amani Soysa
             Senior Software Engineer
How it Works??
Logs are published to BAM via Log4JAppender

Published Logs are Stored in Cassandra (per tenant per day)

When the day is over Logs are published to HDFS file system
daily using BAM analyzers

To view Logs :-
Application Logs – Log events on web applications/services filter
by the application name
System Logs – View the system log of each product {With
filtering categories}

Log Viewers get logs from cassandra <<real time log>> and
HDFS file system <<Archive logs>>
Mt logging with_bam
Log Publisher - Log4JAppender
Setting Up LogEventAppender
    log4j.rootLogger=INFO, LOGEVENT




# 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.appender.LOGEVENT.processingLimit=1000
log4j.appender.LOGEVENT.maxTolerableConsecutiveFailure=20
Stream Definition




streamId = dataPublisher.defineStream("{" + "'name':'log" + "." + tenantId +
"."
+ severName + "." + currDateStr + "'," + " 'version':'1.0.0',"
+ " 'nickName': 'Logs'," + " 'description': 'Logging Event',"
+ " 'metaData':[" + " {'name':'clientType','type':'STRING'}" + " ],"
+ " 'payloadData':[" + "           {'name':'tenantID','type':'STRING'},"
+ "          {'name':'serverName','type':'STRING'},"
+ "          {'name':'appName','type':'STRING'},"
+ "          {'name':'logTime','type':'LONG'},"
+ "          {'name':'priority','type':'STRING'},"
+ "          {'name':'message','type':'STRING'},"
+ "          {'name':'logger','type':'STRING'},"
+ "          {'name':'ip','type':'STRING'},"
+ "          {'name':'instance','type':'STRING'},"
+ "          {'name':'stacktrace','type':'STRING'}" + " ]" + "}");
Log Analyzer
Logging-Config.xml


    Basic Information

        <isDataFromCassandra>true</isDataFromCassandra>


    Information Regarding Cassandra

    <cassandraHost>localhost:9160</cassandraHost>
    <userName>admin</userName>
    <password>admin</password>


    Information Regarding HDFS Server

        <archivedHost>hdfs://localhost:9000</archivedHost>
     <archivedHDFSPath>/stratos/logs</archivedHDFSPath>
Logging Summarizer


Archive logs daily at a given time and store in hdfs file system
summarizer-config.xml

    Basic Information

        <isDataFromCassandra>true</isDataFromCassandra>
        <deleteColFamily>false</deleteColFamily>


    Information Regarding Cassandra
<cassandraHost>localhost:9160</cassandraHost>
 <userName>admin</userName>
 <password>admin</password>

    Information Regarding BAM
    <publisherURL>localhost:7611</publisherURL>
    <userName>admin</userName>
    <password>admin</password>
    <cronExpression>0 0 1 ? * * *</cronExpression>



    Information Regarding HDFS Server

        <archivedHost>hdfs://localhost:9000</archivedHost>
     <archivedLogLocation>/stratos/logs</archivedLogLocation>
Advantages

      Asynchronous and None Blocking Data
    publishing

      Receives and Stores Log Events Cassandra
    Cluster which is high scalable and a big Data
    Repository

      Rich tools set for analytics

      Can be shared with CEP for real time Log
    Event analysis.

      Can provide Logging tool boxes and
    dashboards for system administrators using
    WSO2 BAM
Log Viewer

    Get Logs From Cassandra - <<Latest>>

    Get Archived Logs From HDFS File system
Mt logging with_bam
Log Viewer – Archived Logs
Log Viewer – Application Logs

More Related Content

PDF
Streaming using Kafka Flink & Elasticsearch
PPTX
HBaseCon 2013: OpenTSDB at Box
PPTX
MySQL Slow Query log Monitoring using Beats & ELK
PDF
OpenStack Log Mining
PPTX
Monitoring MySQL with OpenTSDB
PDF
Time Series Data with InfluxDB
PPTX
Elk with Openstack
PPTX
Dbabstraction
Streaming using Kafka Flink & Elasticsearch
HBaseCon 2013: OpenTSDB at Box
MySQL Slow Query log Monitoring using Beats & ELK
OpenStack Log Mining
Monitoring MySQL with OpenTSDB
Time Series Data with InfluxDB
Elk with Openstack
Dbabstraction

What's hot (20)

PDF
OpenTSDB 2.0
PPTX
Google cloud datastore driver for Google Apps Script DB abstraction
PPTX
opentsdb in a real enviroment
PPT
Counters for real-time statistics
PPTX
Goa tutorial
PDF
Gnocchi Profiling 2.1.x
PPTX
Logs management
PDF
RDO hangout on gnocchi
PDF
Do something in 5 with gas 3-simple invoicing app
PPT
Lightweight DAS components in Perl
PDF
Do something in 5 minutes with gas 1-use spreadsheet as database
PPTX
Bucket Your Partitions Wisely (Markus Höfer, codecentric AG) | Cassandra Summ...
PPTX
This is the secure droid you are looking for
PPTX
Streaming kafka search utility for Mozilla's Bagheera
PDF
Gnocchi v3 brownbag
PDF
Do something useful in Apps Script 5. Get your analytics pageviews to a sprea...
PDF
Gnocchi v4 - past and present
PPTX
Node collaboration - Exported Resources and PuppetDB
PDF
Paris Kafka Meetup - How to develop with Kafka
PDF
Gnocchi v4 (preview)
OpenTSDB 2.0
Google cloud datastore driver for Google Apps Script DB abstraction
opentsdb in a real enviroment
Counters for real-time statistics
Goa tutorial
Gnocchi Profiling 2.1.x
Logs management
RDO hangout on gnocchi
Do something in 5 with gas 3-simple invoicing app
Lightweight DAS components in Perl
Do something in 5 minutes with gas 1-use spreadsheet as database
Bucket Your Partitions Wisely (Markus Höfer, codecentric AG) | Cassandra Summ...
This is the secure droid you are looking for
Streaming kafka search utility for Mozilla's Bagheera
Gnocchi v3 brownbag
Do something useful in Apps Script 5. Get your analytics pageviews to a sprea...
Gnocchi v4 - past and present
Node collaboration - Exported Resources and PuppetDB
Paris Kafka Meetup - How to develop with Kafka
Gnocchi v4 (preview)
Ad

Similar to Mt logging with_bam (20)

PDF
2 years with python and serverless
PDF
Streaming Way to Webscale: How We Scale Bitly via Streaming
PDF
LogStash in action
PDF
CloudWatch hidden features for debugging serverless application
PDF
AWS Incident Response Cheat Sheet.pdf
PDF
Central LogFile Storage. ELK stack Elasticsearch, Logstash and Kibana.
PDF
WSO2 Product Release Webinar: WSO2 Complex Event Processor 4.0
KEY
fog or: How I Learned to Stop Worrying and Love the Cloud
PDF
Lessons Learned: Running InfluxDB Cloud and Other Cloud Services at Scale | T...
KEY
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
PDF
NSA for Enterprises Log Analysis Use Cases
PPTX
Lessons Learned Running InfluxDB Cloud and Other Cloud Services at Scale by T...
PPTX
Strata Presentation: One Billion Objects in 2GB: Big Data Analytics on Small ...
PDF
Monitoring InfluxEnterprise
PDF
Hatohol technical-brief-20130830-hbstudy
PDF
Monitoring Error Logs at Databricks
KEY
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
PPTX
Google apps script database abstraction exposed version
PDF
Infrastructure Monitoring with Postgres
PPT
Msdn Workflow Services And Windows Server App Fabric
2 years with python and serverless
Streaming Way to Webscale: How We Scale Bitly via Streaming
LogStash in action
CloudWatch hidden features for debugging serverless application
AWS Incident Response Cheat Sheet.pdf
Central LogFile Storage. ELK stack Elasticsearch, Logstash and Kibana.
WSO2 Product Release Webinar: WSO2 Complex Event Processor 4.0
fog or: How I Learned to Stop Worrying and Love the Cloud
Lessons Learned: Running InfluxDB Cloud and Other Cloud Services at Scale | T...
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
NSA for Enterprises Log Analysis Use Cases
Lessons Learned Running InfluxDB Cloud and Other Cloud Services at Scale by T...
Strata Presentation: One Billion Objects in 2GB: Big Data Analytics on Small ...
Monitoring InfluxEnterprise
Hatohol technical-brief-20130830-hbstudy
Monitoring Error Logs at Databricks
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
Google apps script database abstraction exposed version
Infrastructure Monitoring with Postgres
Msdn Workflow Services And Windows Server App Fabric
Ad

Recently uploaded (20)

PDF
CloudStack 4.21: First Look Webinar slides
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
Getting started with AI Agents and Multi-Agent Systems
PDF
Credit Without Borders: AI and Financial Inclusion in Bangladesh
PPT
Geologic Time for studying geology for geologist
PDF
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
PDF
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
Architecture types and enterprise applications.pdf
PPTX
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PPTX
Custom Battery Pack Design Considerations for Performance and Safety
PDF
OpenACC and Open Hackathons Monthly Highlights July 2025
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PDF
A proposed approach for plagiarism detection in Myanmar Unicode text
PDF
Enhancing emotion recognition model for a student engagement use case through...
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
Abstractive summarization using multilingual text-to-text transfer transforme...
PDF
Zenith AI: Advanced Artificial Intelligence
CloudStack 4.21: First Look Webinar slides
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
Getting started with AI Agents and Multi-Agent Systems
Credit Without Borders: AI and Financial Inclusion in Bangladesh
Geologic Time for studying geology for geologist
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
NewMind AI Weekly Chronicles – August ’25 Week III
Architecture types and enterprise applications.pdf
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
Custom Battery Pack Design Considerations for Performance and Safety
OpenACC and Open Hackathons Monthly Highlights July 2025
A contest of sentiment analysis: k-nearest neighbor versus neural network
A proposed approach for plagiarism detection in Myanmar Unicode text
Enhancing emotion recognition model for a student engagement use case through...
A comparative study of natural language inference in Swahili using monolingua...
Abstractive summarization using multilingual text-to-text transfer transforme...
Zenith AI: Advanced Artificial Intelligence

Mt logging with_bam

  • 1. MT-Logging with WSO2 BAM Amani Soysa Senior Software Engineer
  • 2. How it Works?? Logs are published to BAM via Log4JAppender Published Logs are Stored in Cassandra (per tenant per day) When the day is over Logs are published to HDFS file system daily using BAM analyzers To view Logs :- Application Logs – Log events on web applications/services filter by the application name System Logs – View the system log of each product {With filtering categories} Log Viewers get logs from cassandra <<real time log>> and HDFS file system <<Archive logs>>
  • 4. Log Publisher - Log4JAppender
  • 5. Setting Up LogEventAppender log4j.rootLogger=INFO, LOGEVENT # 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.appender.LOGEVENT.processingLimit=1000 log4j.appender.LOGEVENT.maxTolerableConsecutiveFailure=20
  • 6. Stream Definition streamId = dataPublisher.defineStream("{" + "'name':'log" + "." + tenantId + "." + severName + "." + currDateStr + "'," + " 'version':'1.0.0'," + " 'nickName': 'Logs'," + " 'description': 'Logging Event'," + " 'metaData':[" + " {'name':'clientType','type':'STRING'}" + " ]," + " 'payloadData':[" + " {'name':'tenantID','type':'STRING'}," + " {'name':'serverName','type':'STRING'}," + " {'name':'appName','type':'STRING'}," + " {'name':'logTime','type':'LONG'}," + " {'name':'priority','type':'STRING'}," + " {'name':'message','type':'STRING'}," + " {'name':'logger','type':'STRING'}," + " {'name':'ip','type':'STRING'}," + " {'name':'instance','type':'STRING'}," + " {'name':'stacktrace','type':'STRING'}" + " ]" + "}");
  • 8. Logging-Config.xml  Basic Information <isDataFromCassandra>true</isDataFromCassandra>  Information Regarding Cassandra <cassandraHost>localhost:9160</cassandraHost> <userName>admin</userName> <password>admin</password>  Information Regarding HDFS Server <archivedHost>hdfs://localhost:9000</archivedHost> <archivedHDFSPath>/stratos/logs</archivedHDFSPath>
  • 9. Logging Summarizer Archive logs daily at a given time and store in hdfs file system
  • 10. summarizer-config.xml  Basic Information <isDataFromCassandra>true</isDataFromCassandra> <deleteColFamily>false</deleteColFamily>  Information Regarding Cassandra <cassandraHost>localhost:9160</cassandraHost> <userName>admin</userName> <password>admin</password>  Information Regarding BAM <publisherURL>localhost:7611</publisherURL> <userName>admin</userName> <password>admin</password> <cronExpression>0 0 1 ? * * *</cronExpression>  Information Regarding HDFS Server <archivedHost>hdfs://localhost:9000</archivedHost> <archivedLogLocation>/stratos/logs</archivedLogLocation>
  • 11. Advantages  Asynchronous and None Blocking Data publishing  Receives and Stores Log Events Cassandra Cluster which is high scalable and a big Data Repository  Rich tools set for analytics  Can be shared with CEP for real time Log Event analysis.  Can provide Logging tool boxes and dashboards for system administrators using WSO2 BAM
  • 12. Log Viewer  Get Logs From Cassandra - <<Latest>>  Get Archived Logs From HDFS File system
  • 14. Log Viewer – Archived Logs
  • 15. Log Viewer – Application Logs