Setting WSO2 STATS_DB

I configured API Manager 2.0.0 and the Analytics Pack API to use MySQL databases.

For each server, there is WSO2AM_STATS_DB. I gave these different names on my MySQL server. I also pointed my data sources in master-datasources.xml (for APIM) and stats-datasources.xml (for Analytics) to the corresponding databases.
I could not find the appropriate dbscripts for these databases in their respective packages.

When launched, the Google Analytics database is populated, but the APIM database is not and throws an exception. The Analytics database not only receives the schema, but also information about calling my API. However, I cannot get statistics on my toolbar.

Earlier, I (involuntarily) configured the h2-repository statistics database to be the same for both servers (due to the folder structure) and was able to get all the statistics on my panel in the publisher.

Other configurations I tried: On the MySQL server, I pointed it to the same database (one of them is the Google Analytics schema), but without results in my dashboard (after some time out).

+3
source share
1 answer

Both data sources (WSO2AM_STATS_DB) on 2 servers must point to the same database. There are no database scripts for this. Tables are created automatically.

DB . ( ../ )

<url>jdbc:h2:../tmpStatDB/WSO2AM_STATS_DB;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000;AUTO_SERVER=TRUE</url>

, , , ( tmpStatDB ) .

/parent_dir
     |__wso2am-2.0.0/
     |__wso2am-analytics-2.0.0/
     |__tmpStatDB/

, , wso2am-analytics , apim .

+2

Source: https://habr.com/ru/post/1657137/


All Articles