wso2wso2-api-managerwso2-bam

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?


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.