WSO2 API Analytics: From where the data gets into WSO2AM_STATS_DB - wso2

I am fairly new with WSO2 products and currently checking on the ApiM and Analytics products.
I am able to configure the WSO2 APIM and Analytics products successfully with SQL database and now able to get the stats as well.
In further exploring, I want to know from where the data gets inserted into various tables inside WSO2AM_STATS_DB.
If its through events, then can some one please throw light on the same.
Thanks

Yes it is though a collection of Siddhi Apps running in APIM Analytics which is based on Stream Processor. You can find corresponding siddhi apps under /wso2/worker/deployment/siddhi-files. Below are the files
APIM_ACCESS_SUMMARY.siddhi
APIM_FAULT_SUMMARY.siddhi
APIM_REQUEST_PROCESSOR.siddhi
APIM_WORKFLOW.siddhi
These are written using Siddhi and here is the link to siddhi query guide if you need to understand.

Related

Disable analzer in WSO2 API Manager

So quick question regarding WSO2 API manager and BAM from what I can tell Bam saves the basic requests to the API manager to the DB and the Publisher then reads from the DB when displaying the stats. At what point in the analyzer part of BAM in action ie Casandra and Hadoop. Or does that just get used if I write my own hive queries?
Thanks
When you integrate WSO2 BAM with API Manager for Analytics following happens.
API Manager publishers data using thrift for BAM.
There are hive scripts which is included in the toolbox. There are scheduled and when they are running summarized data will be inserted into the databases.

WSO2 APIM Analytics Not Showing Any stats

We have setup WSO2 API manager and also APIM Analytics following the below link (https://docs.wso2.com/display/AM200/Configuring+APIM+Analytics)
but we are not able to see any analytical data in publisher or store.
We see the message "Data Publishing Enabled. Generate some traffic to see statistics". However, even after generating the traffic, nothing appears. We also checked in the database and don't see any records added to the database tables.
Can anyone help in getting this issue resolved. Thanks
If you have enabled stat publishing correctly, you should see the following info log in wso2 API Manager side.
INFO {org.wso2.carbon.databridge.core.DataBridge} - user admin
connected {org.wso2.carbon.databridge.core.DataBridge}
You can also check if the data has published to the APIM Analytics node. Do the following.
Log into APIM Analytics management console - https://localhost:9444/carbon
Click on Data Explorer in Main menu.
Select table as 'ORG_WSO2_APIMGT_STATISTICS_PERMINUTEREQUEST'.
You should see data in these tables, if the data has been published.
Basically, Analytics node will summarize the data and save the summarized data in the external database. When showing the data in the publisher and store, it will retrieve those data from the database.
If you are using mysql or any other database apart from h2, you need to point to the same stat database in APIM and Analytics nodes.

How do I integrate WSO2 Data Analytics Server and WSO2 API Gateway?

I can't seem to get them to communicate even on the same box.
Are there step by step instructions I can follow that I can go through to figure out what I'm doing wrong?
From API Manager 1.10.0 onwards, you can fetch summarised data using two clients:
The REST client which fetches data directly from DAS.
The RDBMS client which fetches data from RDBMS.
You have have look on Publishing API Runtime Statistics

Error occured while getting API in WSO2 APIM with BAM

I'm new to WSO2 products and I was trying to set up the API statistics by configuring APIM with BAM as said in this documentation for publishing the stats https://docs.wso2.com/display/AM170/Publishing+API+Runtime+Statistics#PublishingAPIRuntimeStatistics-point3.
However every time I try to configure the statistics, start BAM, and re-start APIM I always get an error on the APIM console "Error occured while getting API's".
What does this mean?
Does it mean I have to configure first APIM and BAM before I can make an API and check it's statistics?
I don't get it why following the manual results into something like an error. Is there something wrong with my configuration?
here are few ways to debug whats going wrong. How API-M and BAM integration works is that
API -> publish stats to BAM
BAM stores the stats in Cassandra
BAM uses Hive scripts to analyse the data and write the results to a RDBMS mentioned in master-datasources.xml
I would recommend you to check the number 2. by checking if stats are published to BAM. You can do this by login into the management console of BAM and going to the Analytic section and adding the following script
select * from APIRequestData;
Execute this script and see if any data is returned. If no data is returned then data is not correctly published from API-M to BAM. If data is available here then there is an issue in reading the data from RDBMS to API-M.
I recommend you check the master-datasources.xml file which you edited during configuration. There may be an issue there, if the API Manager cannot connect to its' own database. The datasources given in step 2 of the guide you used are in addition to the existing datasources. If this isn't it, then please provide a stack dump or more detailed error messages. Cheers.

Creation Dashboard using WSO2 BAM already defined dashboards

I have question. I need to provide the report for my master work to compare BAM tools and one of them is WSO2 BAM.I am beginner in it. I have to provide dashboards in WSO2BAM which will take information from my own database, from Oracle. According to the theoretical introduction of WSO2BAM it has already defined dashboards and is it possible to configure it for my own database and how? and Is there some tutorials, some documentation or examples?
Check under user defined data in the BAM documentation. It should tell you how to do send custom events. After this is stored in the BAM database. You have to write a gadget and a data service or a back end component to pull out the data and display the data.