0
votes

I am setting up wso2 API manager 1.10.x with DAS 3.0.1 for publishing API statistics using mysql. My API manager system is clustered with gateway worker node on a separate VM. I followed the documents to enable analytics for API manager via UI. I also followed this document to manually enable analytics for gateway worker node. http://blog.rukspot.com/2016/05/configure-wso2-apim-analytics-using-xml.html After setup, I restart all servers, everything seems fine. But when I make a request to published API, gateway does not publish any statistics to DAS receiver. No data in DAS summary tables either. By debugging wso2 Gateway, I am able to narrow it down to the fact that private static ServiceDataPublisherAdmin dataPublisherAdminService; inside org.wso2.carbon.apimgt.impl.internal.APIManagerComponent never get set. Therefore APIMgtUsageHandler does not do anything. Any idea on what could cause this to happen? Thanks.

1
I have confirmed that private static ServiceDataPublisherAdmin dataPublisherAdminService will be set in the manager node when carbon is initialized. So configuration in the worker node will cause this?laomao
By using osgi console to wso2, I confirmed that org.wso2.carbon.statistics_4.4.8 bundle only exists in the Manager node, but not the worker node. But the jar file exist in both places. so why the bundle is not activated in API manager gateway worker node?laomao

1 Answers

0
votes

Figured it out myself. bundle org.wso2.carbon.statistics_4.4.8 and 2 other statistics bundles are necessary for gateway worker to publish statistics data to DAS. But worker profile provided in the package of wso2 API manager 1.10.0 had them excluded. To work around it, start wso2 on worker node with -Dprofile=default. You can use osgi console to confirm the activation of these bundles. Once the bundle is activated, class inside is instantiated, gateway will start to publish statistics to DAS when you invoke a published API.