Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top