Search code examples
wso2wso2-api-managerwso2-das

wso2 API manager publishing runtime to DAS : DAS has no data in WSO2_STATS_DB


I use independent wso2 API manager 1.10.0 and wso2 DAS 3.0.0 on AWS ec2 to gather statistics of my API usage and I use postgresql to be external RDBMS to store summary data.

APIM configurations on Admin-Dashboard

Event Receiver Configurations :

tcp://DAS-IP:7611

Data Analyzer Configurations :

https://DAS-IP:9443

Statistics Summary Datasource :

My-postgresql-url

APIM configuration in api-manager.xml

Disable rest client and enable RDBMS client

DAS configuration

Set datasource WSO2AM_STATS_DB in master-datasources.xml

Scenario

  1. Login to APIM publisher

  2. Deploy sample API

  3. Go to APIM store

  4. Subscribe sample API

  5. Go to APIM publisher

  6. Click statistics > API usage

  7. Only show example statistics page.

APIM Logs

[2016-04-22 06:12:47,787]  INFO - EmbeddedRegistryService Configured Registry in 0ms

[2016-04-22 06:12:48,015]  INFO - CarbonAuthenticationUtil 'admin@carbon.super [-1234]' logged in at [2016-04-22 06:12:48,015+0000]

[2016-04-22 06:12:48,360]  INFO - CarbonAuthenticationUtil 'admin@carbon.super [-1234]' logged in at [2016-04-22 06:12:48,359+0000]

[2016-04-22 06:12:48,605]  INFO - CarbonAuthenticationUtil 'admin@carbon.super [-1234]' logged in at [2016-04-22 06:12:48,605+0000]

[2016-04-22 06:12:48,664]  INFO - CarbonAuthenticationUtil 'admin@carbon.super [-1234]' logged in at [2016-04-22 06:12:48,664+0000]

[2016-04-22 06:12:48,920]  INFO - CarbonAuthenticationUtil 'admin@carbon.super [-1234]' logged in at [2016-04-22 06:12:48,920+0000]

[2016-04-22 06:12:49,296]  INFO - API Initializing API: admin--CalculatorAPI:v1.0

[2016-04-22 06:13:05,384]  INFO - **ReceiverGroup Resending the failed published data...**

DAS Logs

[2016-04-22 04:09:00,218]  INFO {org.wso2.carbon.databridge.core.DataBridge} -  user admin connected

[2016-04-22 04:09:32,439]  INFO {org.wso2.carbon.databridge.core.DataBridge} -  user admin connected

[2016-04-22 04:09:47,474]  INFO {org.wso2.carbon.databridge.core.DataBridge} -  user admin connected

[2016-04-22 04:33:10,239]  INFO {org.wso2.carbon.databridge.core.DataBridge} -  user admin connected

[2016-04-22 04:35:28,672]  INFO {org.wso2.carbon.databridge.core.DataBridge} -  user admin connected

[2016-04-22 06:05:18,848]  INFO {org.wso2.carbon.databridge.core.DataBridge} -  user admin connected

[2016-04-22 06:12:53,017]  INFO {org.wso2.carbon.databridge.core.DataBridge} -  user admin connected

[2016-04-22 06:13:09,173]  INFO {org.wso2.carbon.databridge.core.DataBridge} -  user admin connected

DAS WSO2_STATS_DB status

From DAS dashboard > configure > data sources,I've checked the status of all DB is active and tested connection is healthy.


I don't know if WSO2AM_STATS_DB doesn't support postgresql or my configuration gets something wrong.

thanks


Solution

  • I raised a public jira for the APIM Stat scripts folder does not have the PostgreSQL script.

    APIM does not publish subscription events to the DAS. Subscription details are kept in the WSO2AM_DB database and we used AM_SUBSCRIBER and AM_SUBSCRIPTION table for that purpose.

    Hope you followed this documentation.