配置WSO2 STATS_DB [英] Configuring WSO2 STATS_DB

查看:99
本文介绍了配置WSO2 STATS_DB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经配置了API Manager 2.0.0& API Manager Analytics Pack使用MySQL数据库.
对于每个服务器,都有一个WSO2AM_STATS_DB.我在我的MySQL服务器上给了这些不同的名称.我也已在master-datasources.xml(用于APIM)&中指出了我的数据源. stats-datasources.xml(用于Analytics)到相关数据库.
在它们各自的包中找不到这些数据库的任何相关架构(dbscripts).

I have configured API Manager 2.0.0 & API Manager Analytics Pack to use MySQL databases.
For each server, there exists a WSO2AM_STATS_DB. I have given these differing names on my MySQL server. I have also pointed my datasources in master-datasources.xml(for APIM) & stats-datasources.xml(for Analytics) to the relevant databases.
I couldn't find any relevant schema(dbscripts) for these databases in their respective packs.

运行时,将填充Analytics数据库,但不会填充APIM数据库,并且会引发异常. Google Analytics(分析)数据库不仅获取架构,还获取我的API的调用详细信息. 但是,我无法在仪表板上获取统计信息.

On running, the Analytics database is populated but the APIM database isn't and throws an exception. The Analytics database not only gets the schema but also the invocation details of my API. I am unable to get the stats on my dashboard though.

以前,我(不经意间)将h2-repository stats数据库配置为两台服务器都相同(由于文件夹结构的原因),并且能够在发布者的仪表板上获取所有统计信息.

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

我尝试过的其他配置: 在MySQL服务器上,将其指向相同的数据库(带有模式的Google Analytics(分析)数据库),但在我的仪表板上没有任何结果(等待一会儿之后).

Other configurations I have tried : On the MySQL Server, pointed it to the same database (the Analytics one with the schema) but with no results on my dashboard (after waiting for a while).

推荐答案

2个服务器中的两个数据源(WSO2AM_STATS_DB)都应指向同一数据库.没有为此的数据库脚本.表是自动创建的.

Both datasources (WSO2AM_STATS_DB) in 2 servers should be pointed to the same database. There are no database scripts for this. Tables are created automatically.

默认情况下,两个服务器中的Stats DB路径都是这样的. (请注意../部分)

By default in both servers, Stats DB path comes like this. (note ../ part)

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

因此,如果您将两个服务器都提取到此文档,两个数据源都将这样指向同一数据库(在tmpStatDB内部).

So if you extract both servers to the same directory as mentioned in this doc, both datasources will be pointing to the same database (inside tmpStatDB) like this.

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

因此,这里发生的是,wso2am-analytics将统计数据写入共享数据库,然后apim读取它并在其数据库上显示数据.

So, what happens here is, wso2am-analytics writes stats data to shared database, then apim reads it and shows data on its databases.

这篇关于配置WSO2 STATS_DB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆