collecting and analyzing api statistics
DESCRIPTION
TRANSCRIPT
Last Updated: Oct. 2014
Joseph Fonseka & Chamila Adhikarinayake
Collecting and Analyzing API
Statistics
WSO2 API Manager Team
**
About the Presenters
๏ Joseph FonsekaJoseph joined WSO2 in September 2013. He is a Senior Tech Lead in the WSO2 API Manager team where he focuses on improving the UX of the API Manager. In addition to his product development efforts he is also a contributor to the Sahana and OpenEvsys open-source projects. He is also a FOSS advocate.
๏ Chamila AdhikarinayakeChamila is Software Engineer at WSO2. Prior to joining WSO2, he worked at AtLink Communications (Pvt) Ltd. as a trainee Software Engineer where he was responsible for developing a customer loyalty application system for Dialog Axiata PLC. He holds a bachelor’s degree in Computer Science and Engineering from University of Moratuwa.
*
About WSO2
*
๏ Global enterprise, founded in 2005 by acknowledged leaders in XML, web services technologies, standards and open source
๏ Provides only open source platform-as-a-service for private, public and hybrid cloud deployments
๏ All WSO2 products are 100% open source and released under the Apache License Version 2.0.
๏ Is an Active Member of OASIS, Cloud Security Alliance, OSGi Alliance, AMQP Working Group, OpenID Foundation and W3C.
๏ Driven by Innovation
๏ Launched first open source API Management solution in 2012
๏ Launched App Factory in 2Q 2013
๏ Launched Enterprise Store and first open source Mobile solution in 4Q 2013
**
What WSO2 delivers
*
Introduction
● What API Manager Offers.
● Collecting & Analysing statistic with BAM.
● Analysing & Visualizing Stats ( Example ).
● Real Time data analysis & alerting with CEP.
*
Collecting Stats with AM
● API manager push statistical data through event streams. ( Request, Response & Fault )
● AM event streams can be configured to push data to CEP & BAM.
● Google Analytics handler can be use to push API usage data to GA.
*
AM Deployment
Back End Service
Client / Partner
Event Streams Event Streams
STAT DBAggregated Data
Statistical data retrive for display
1 2
3 3
45
*
Configuring APIM with BAM● Official Documentation
○ https://docs.wso2.com/display/AM170/Publishing+API+Runtime+Statistics
● Steps○ Create a database to store api usage statistics. This
database is shared between API manager and BAM ○ Configure WSO2 AM to publish data to WSO2 BAM
using default publisher agent○ Deploy toolbox in BAM to analyze and put
summarized data to shared database
*
Data passed in the default stream
*
View Statistics using API Manager● API Runtime Statics - View API usage from API Publisher and
API Store ○ View information related to api subscriptions, api usage,
usage related to api version, etc from API Publisher○ View application related information○ These charts can be customized
● Monetization of the API usage - View Billing information from API Store ○ Generate bills for API consumers on usage
*
View Usage Data using BAM tools● Published data can be visualized using BAM gadget tools and
reporting tools
○ BAM gadget tools■ Can configure to query stat database in a constant intervals and
display the data in charts.
○ BAM reports■ Can create many types of report such as bar chart report, table
report, pie chart, etc.
*
Real Time Analysis with CEP
● WSO2 CEP identifies the most meaningful events within the event cloud, analyzes their impacts, and acts on them in real time.
● CEP is extremely high performing and massively scalable.
● It allows you to execute Siddhi queries to process and Analyse data in an event stream.
*
Real Time Dashboard Sample
● We will looking at how to setup a simple dashboard to monitor per-second request count coming in to an API.
*
Sample Setup
Back End Service
Client / Partner
Event Streams Event Streams
1 2
3 3
4Real Time Stats (HTTP)
*
Configuring CEP Demo
● Configure API Manager to push event stream to CEP.
● Create an Execution Plan.
● Configure Output Event Adapters.
● Configure Outflow of a stream.
*
Questions ?
Contact us !