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

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

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.

How to implement Edge computing using WSO2

I am currently running WSO2 Analytics on a windows server but I want implement the analysing part somehow that a client can connect to the server and do some processing like visualization on its own rather than all processing being done on the server. Is this something possible on WSO2 platform?
Thanks
You can setup database you want ( see the documentation ). For production usage I woudn't even recomment using the bundled H2 database. WSO2 analytics supports number of databases by default, I believe Oracle is one of them.
As stated in the comments - you can create a client or service which reads the data from the database and displays them its own way.
most challenging part for me is that how the client uses the information from the database?
This is already on your own (outside scope of this question). You've asked if your client can access the analytics (result) data - yes you can. How to do that is up to you. (depending what the client is, ..)
For example at our client they are building data APIs which are directly consumable by different frontend libraries creating nicer charts and reports.

WSO2-APIM Analytics : Can we export raw data to excel or csv?

I am currently experimenting with WSO2 API Manager 2.0.0 Analytics features. I have question as following.
If I want to query raw data (not the summary data) from APIM Analytics is this the correct URL for the documentation about the API?[https://docs.wso2.com/display/DAS300/Analytics+REST+API+Guide]
Is there feature to export raw data from APIM Analytics table to excel or csv file without having to write program to call the provided API?
Thank you very much
Please find the answers below.
To configure analytics for APIM 2.0.0, you are using API Manager Analytics distribution as described in API Manager docs. The documentation that you refer is DAS 3.0.0 that gives you the DAS REST API to explore the data.
In API Manager analytics, it is using the RDBMS approach and you can use the Data Explorer in Management Console of API Manager Analytics distribution to explore data. It consist of some filters too.
After login to the API Manager Analytics, go to Manage > Interactive Analytics > Data Explorer to view raw data.
WSO2 API Manager do not have the capability of exporting raw data directly to CSVs. You can use SQL commands on tables of raw data to export them as CSVs.

What WSO2 technologies can I use to implement something like this? Is Enterprise Integration the right choice?

I am absolutly new in the WSO2 world and I have the following problem.
I have to developer a toolkit application and the customer says to me that, if possible, they want introduce WSO2 technologies in this project. I will try to explain what exactly this toolkit project have to do to try to understand if and what WSO2 technologies eventually can match with the requirement.
The toolkint project have to do:
1) When executed have to connect to a local database and perform some queries.
2) Use the data obtained from the previous query to create an XML document.
3) Send this XML document into a request to a web service (I think that the content of this XML will be put into the request body of the sended request).
4) Use the web service response to update some data in the local database.
So I am trying to understand if there are some WSO2 technologies that match these requirements or if it is better to create this toolkit as a simple standard Java program.
Searching online I have identified WSO2 Enterprise Integration and WSO2 Data Services Server (that I think it is included into WSO2 Enterprise Integration).
At the beginning I had thought to use Data Services Server to access to the DB, perform the queries and so retrieve data from the DB tables.
But reading the official documentation (https://docs.wso2.com/display/DSS351/About+Data+Services+Server) it seems to me that it is more a technology thinked to expose a DB using web service, infact in this documentation I can read:
Data services provide a convenient mechanism to configure a Web
service interface for data in various datasources such as relational
databases, CSV files, Microsoft Excel sheets, Google spreadsheets
etc...
Infact reading this official tutorial: https://docs.wso2.com/display/DSS351/Quick+Start+Guide
it seems to me that if does the opposite of what I have to do.
IT DOES:
SET THE DB CONNECTION.
PERFORM THE QUERY.
EXPOSE THE DATA RETURNED BY THIS QUERY AS A WEB SERVICE.
I HAVE TO DO:
SET THE DB CONNECTION.
PERFORM THE QUERY.
SEND THE OBTAINED DATA TO A WEB SERVICE (in XML format).
So it seems to me that Data Services Server is not the right choice because it seems to me that more than help me to do data access, data manipulation and send these data to an endpoing it is useful to do data access and to expose these data as a web service (but maybe I am missing something).
So I am trying to understand if WSO2 Enterprise Integration contains some modules that better fulfills my requirements.
Reading the official documentation (https://docs.wso2.com/display/EI600/Enterprise+Integration+Patterns) it seems to me that I can use:
1) BPEL/BPMN process to define the operations flow.
2) It seems to me that I can do DB queries but I always have the same doubt (that it is used to expose the retrieved data as service and not to use internally, it seems to me that this is WSO2 Data Services Server putted into WSO2 Enterprise Integration).
3) I think that this module provides me a way to aggragate data from some queries into an XML document: https://docs.wso2.com/display/EI600/Transforming+Message+Content
4) I can send a request with the previous generated XML usingsomething like this: https://docs.wso2.com/display/EI600/Sending+a+Simple+Message
So can you help me to identify what WSO2 techonlogies I can use to implement something like this or if it is better to implement it manually in pure Java?
1) When executed have to connect to a local database and perform some queries.
R:/For this point you can create a data service using DSS or EI.
2) Use the data obtained from the previous query to create an XML document.
R:/You can create a proxy service using the ESB or EI, inside the proxy service you call the data service created in the previous point(using call mediator) and get the response message in a property mediator to create a new payload message(using payload, enrich or/and a xslt mediator).
3) Send this XML document into a request to a web service (I think that the content of this XML will be put into the request body of the sended request).
R:/Inside the proxy service created in the previous point and after the creation of the new payload message you can send that payload to another webservice using call mediator.
4) Use the web service response to update some data in the local database.
R:/ You can get the response message, create a new payload message and call another data service, or another operation of the same data service created in the first point.
UPDATE 1:
you can use the IDE or the web UI, as you like. for the implementation check this out: Combine two queries using WSO2 ESB as a start.
Inside the IDE you can go to Developer Studio menu, clic in OpenDashboard and create a "ESB Solution Project" or a "ESB Config Project" for the ESB stuff, and a Data Service Project for the data service.

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.