配置 WSO2 STATS_DB [英] Configuring WSO2 STATS_DB

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

问题描述

我已配置 API Manager 2.0.0 &API Manager 分析包使用 MySQL 数据库.
对于每个服务器,都存在一个 WSO2AM_STATS_DB.我在我的 MySQL 服务器上给出了这些不同的名称.我还将我的数据源指向了 master-datasources.xml(for APIM) &stats-datasources.xml(用于分析)到相关数据库.
我在它们各自的包中找不到这些数据库的任何相关架构(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 数据库未填充并引发异常.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 统计数据库配置为两个服务器的相同(由于文件夹结构),并且能够在发布者的仪表板上获取所有统计信息.

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 服务器上,将其指向同一个数据库(带有架构的 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).

推荐答案

两台服务器的数据源(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天全站免登陆