WSO2 APIM Analytics Not Showing Any stats - wso2

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.

Related

WSO2 API Analytics: From where the data gets into WSO2AM_STATS_DB

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.

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.

How to write analyzed data from wso2 DAS to custom database for API manager

In my case i'm using wso2 api manager and Data analytic server. I need to show the analyzed data on the api manager publisher or subscriber accounts which are analyzed by the DAS. I rifer reference source
In the DAS side I can see the results perfectly. But can't see the statistics from the API manager side.
Only I can see "Data Publishing Enabled, Generate some traffic" message.
Not getting any error too.
please guide me how can I resolve this.
[Edited]I got this exception after following the steps mentioned in the #Prabudda Sri Rahal 's answer.
So how can I resolve this issue.
Need to add API_Manager_Analytics.car file to DAS as a carbon application. Then it creates all the necessary streams, event receivers. But it doesn't create event publishers to publish these data to our custom database. For that need to create event publishers manually to write on the database tables by mapping correct stream attributes with the database column names.
Refered: enter link description here
Maybe you should add the API_Manager_Analytics.car as described in
this blog.

WSO2 Governance Service Audit

Is there a way to show entire Audit Log associated to one service in the Service Detail layout instead of having to go search activities & figuring out changes?
Thanks.
As i know, It is not supported yet. You need to search in log file using the service name and found out them. Actually for analysis logs and audit, WSO2 may recommend the BAM server where you want to publish server's audit and log data

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.