WSO2 Advantage Webinar WSO2 BAM2 Integration with mule esb


Published on

  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

WSO2 Advantage Webinar WSO2 BAM2 Integration with mule esb

  1. 1. WSO2 BAM2 Integration with Mule ESB Kasun Weranga Gunathilake Software Engineer – WSO2 BAM
  2. 2. Why server monitoring? Analyze all business transactions To find a root cause for a failure Prevent outages with rapid problem identificationand resolution Monitor performance and availability of all ESBs Understand resource utilization for tuning andcapacity planning
  3. 3. Business Activity Monitoring“The aggregation, analysis, andpresentation of real-time informationabout activities inside organizationsand involving customers and partners.”- Gartner
  4. 4. Aggregation● Capturing data● Data storage● What data to capture?
  5. 5. Analysis● Data operations● Building KPIs● Operate on large amounts of historic data or new data● Building BI
  6. 6. Presentation● Visualizing KPIs/BI● Custom Dashboards● Visualization tools● Not just dashboards!
  7. 7. BAM Architecture
  8. 8. Things to Monitor● Server logs● Server resource consumption● Statistics of services in Mule ESB● Analyzing business transactions ( by inspecting payload)
  9. 9. Monitor Server logs● Mule ESB uses log4j for logging.● A Log4j appender can be used to capture log events.● Write a custom BAM agent to publish log events from Mule ESB to BAM.
  10. 10. Monitor Server logs
  11. 11. Custom Agents● Java SDK provided● Asynchronous & non-blocking● Use Thrift for high performance message throughput● Due to Thrift, different languages can be supported● Compatible with CEP/BAM
  12. 12. Log4jAppender● log4j.appender.LOGEVENT=org.wso2.carbon.mule.log.appender.LogEventAppender log4j.appender.LOGEVENT.receiverUrl=tcp://localhost:7611 log4j.appender.LOGEVENT.authenticationUrl=ssl://localhost:7711 log4j.appender.LOGEVENT.trustStorePassword=wso2carbon log4j.appender.LOGEVENT.columnList=%-5p,%d,[%t],%c:,%m%n log4j.appender.LOGEVENT.userName=admin log4j.appender.LOGEVENT.password=admin log4j.appender.LOGEVENT.processingLimit=1000 log4j.appender.LOGEVENT.maxTolerableConsecutiveFailure=20● log4j.rootCategory=INFO, console, LOGEVENT
  13. 13. The Analyzer Engine● Analyzers are based on Easy to learn, SQL like Hive query language● Runs locally or delegates to Hadoop cluster ● Scalable analytics ● Cluster can range from a couple of nodes to 1000s● Analyzers can be scheduled● Supports Polyglot data architecture
  14. 14. Advantage of Using BAM● Provide central place to analyze all the log information (ex:- logs of ESB cluster).● Ability to analyze large amount of historical log events● Efficient way to analyze the root cause for a failure.
  15. 15. Analyze Mule logs● select logTime, logType, threadName, category, logMessage, logTimestamp from LogCollector where logtype=WARN and logTimestamp > unix_timestamp(2013-01-06 11:00:00) order by logTimestamp;
  16. 16. Demonstration..● Configure Mule ESB to send log events to BAM● Analyze logs using BAM
  17. 17. Monitor Business Transactions● Capture useful information by inspecting payloads● A Mule ESB interceptor can be used to capture data from payloads● Write a custom BAM agent to publish captured data from Mule ESB to BAM
  18. 18. Monitor Business Transactions
  19. 19. Mule Interceptor● Use Bookstore example comes with Mule● Capture order details using Interceptor <flow name="OrderService"> <http:inbound-endpoint address="" exchange-pattern="request-response" doc:name="Public order interface"/> <cxf:jaxws-service serviceClass="org.mule.example.bookstore.OrderService" /> <custom-interceptor class="org.wso2.carbon.mule.interceptor.BAMInterceptor"/> <component doc:name="Order Service"> <singleton-object class="org.mule.example.bookstore.OrderServiceImpl"/> </component> <async> <vm:outbound-endpoint path="emailNotification" exchange-pattern="one-way" doc:name="Email Notification"/> <vm:outbound-endpoint path="dataWarehouse" exchange-pattern="one-way" doc:name="Data Warehouse"/> </async> </flow>
  20. 20. Analyze and present information● Hive queries use to analyze the captured data.● Schedule Hive scripts to do the periodic summarizations.● Gadget gen tool can be used to generate gadgets and deploy on dashboard.● Plug 3rd party reporting engines to present information
  21. 21. Demonstration...● Capture order details from Mule bookstore sample● Summarize sales against book titles and authors● Visualize in dashboard
  22. 22. Monitor Server via JMX● Server resource consumption (CPU, heap/non- heap memory, threads, etc..)● Statistics of services deployed in Mule ESB
  23. 23. Monitor Server via JMX● Enable JMX in Mule ESB (can use <jmx- default-config> )● Configure JMX agent to pull statistics and store in BAM – Provide the JMX server (Mule ESB) – Select JMX attributes need to monitor – Configure publisher● Install JMX statistics toolbox in BAM
  24. 24. Monitor Server via JMX
  25. 25. Demonstration● Monitor server resources (CPU, Memory)● Monitor statistics of order service in Mule ESB
  26. 26. Real time Monitoring of Mule ESB● Improve Risk Management by rapid problem identifications● Detect specific business conditions or patterns to enable instantaneous response.● To take timely business decisions
  27. 27. Real time Monitoring● Real time analytics via CEP● Based on Siddhi - A high performance complex event processing engine developed at WSO2● Can be seamless integrated with BAM to form a complete analytics solution
  28. 28. Real time Monitoring
  29. 29. Demonstration...● Notify sudden increase in sales● Notify users about unusual system errors
  30. 30. Summary● Importance of Monitoring the server● BAM architecture● Monitor server logs● Monitor business transactions● Monitor server via JMX● Realtime monitoring via CEP
  31. 31. Questions?
  32. 32. Useful Links....● BAM Docs● Setting up JMX agent● Write a custom data-agent● CEP docs● Hive query language● Mule docs