简体   繁体   English

WSO2 AM将信息发布到WSO2 DAS

[英]WSO2 AM publish infomaion to WSO2 DAS

I installed both WSO2 AM and DAS on same machine and make offset 3 ( 3) for DAS server. 我在同一台计算机上同时安装了WSO2 AM和DAS,并为DAS服务器设置了偏移量3(3)。 But cannot see statistics dashboard in api manager. 但无法在api管理器中看到统计信息显示板。

Configure Analytics: 配置分析:

配置Analytics

Statistics in AM: AM中的统计信息: 统计

DAS only summarizes the statistics in 5 minutes intervals. DAS仅以5分钟为间隔汇总统计信息。 Eg: 10:00, 10:05, 10:10, ... (fixed intervals in a day). 例如:10:00、10:05、10:10,...(每天固定间隔)。 Therefore, until the first 5 minutes are passed (if current time is 10:03, it will happen in 10:05), the summarized tables will not be created in DAS and publisher/store cannot retrieve that information during that time so the default image will be displayed. 因此,直到经过前5分钟(如果当前时间是10:03,它将在10:05发生),汇总表将不会在DAS中创建,并且发布者/商店在此时间内无法检索该信息,因此默认将显示图像。 After that time period, you will be able to see the statistics in the first 5 minutes interval. 在该时间段之后,您将能够在前5分钟的间隔内查看统计信息。 Next update will happen after another 5 minutes, therefore the API invocations you do after first 5 minutes will be included in the statistics after another 5 minutes an so forth. 下一个更新将在另外5分钟后发生,因此您在前5分钟后执行的API调用将在另外5分钟后被包括在统计信息中,依此类推。 So you should be able to see the updated summarized statistics of API usages after every 5 minute intervals. 因此,每隔5分钟您应该就能看到API使用情况的最新汇总统计信息。

You can verify that the data is published into DAS by login to DAS management console, go to data explorer in the main tab. 您可以通过登录DAS管理控制台验证数据是否已发布到DAS中,转到主选项卡中的数据浏览器。 Then select the table: ORG_WSO2_APIMGT_STATISTICS_REQUEST. 然后选择表:ORG_WSO2_APIMGT_STATISTICS_REQUEST。 You will able to see the information of all API requests you have sent. 您将能够查看已发送的所有API请求的信息。 After 5 minutes interval is passed, you should be able to see API_VERSION_USAGE_SUMMARY table as well, which stores the summarized usage data from which publisher and store retrieves that information. 经过5分钟的间隔后,您还应该能够看到API_VERSION_USAGE_SUMMARY表,该表存储了摘要的用法数据,发布者从该摘要数据中存储,并且商店从中检索该信息。 Could you please verify them in the DAS node. 您能否在DAS节点中进行验证。

Please follow the steps as below. 请按照以下步骤操作。 As this step already done, skipping it. 完成此步骤后,请跳过它。

  1. As you have started API Manager node already pointing to DAS node, it will create some Stream Definitions as below. 当您启动已经指向DAS节点的API Manager节点时,它将创建如下的流定义。 Navigate to WSO2 DAS Management console open Main -> event -> streams. 导航到WSO2 DAS管理控制台,打开Main-> event-> stream。 Delete any stream that has got created. 删除任何已创建的流。 (please see das_stream.png below) (请参见下面的das_stream.png)

在此处输入图片说明

  1. Copy [APIM_HOME]/statistics/API_Manager_Analytics_REST.car file into [DAS_HOME]/repository/deployment/server/carbonapps. 将[APIM_HOME] /statistics/API_Manager_Analytics_REST.car文件复制到[DAS_HOME] /存储库/部署/服务器/ carbonapps中。 Folder carbonapps will not be there by default. 默认情况下,文件夹carbonapps将不存在。 You need to create manually. 您需要手动创建。 One done you will see below logs in DAS console. 完成一项操作后,您将在DAS控制台中看到以下日志。

TID: [-1234] [] [2016-08-05 10:28:56,803]  INFO {org.wso2.carbon.application.deployer.internal.ApplicationManager} -  Deploying Carbon Application : API_Manager_Analytics_REST.car... {org.wso2.carbon.application.deployer.internal.ApplicationManager}
TID: [-1234] [] [2016-08-05 10:28:57,275]  INFO {org.wso2.carbon.event.stream.core.EventStreamDeployer} -  Stream definition is deployed successfully  : org_wso2_apimgt_statistics_destination:1.0.0 {org.wso2.carbon.event.stream.core.EventStreamDeployer}
TID: [-1234] [] [2016-08-05 10:28:57,278]  INFO {org.wso2.carbon.event.stream.core.EventStreamDeployer} -  Stream definition is deployed successfully  : org.wso2.apimgt.statistics.fault:1.0.0 {org.wso2.carbon.event.stream.core.EventStreamDeployer}
TID: [-1234] [] [2016-08-05 10:28:57,280]  INFO {org.wso2.carbon.event.stream.core.EventStreamDeployer} -  Stream definition is deployed successfully  : org.wso2.apimgt.statistics.request:1.0.0 {org.wso2.carbon.event.stream.core.EventStreamDeployer}
TID: [-1234] [] [2016-08-05 10:28:57,281]  INFO {org.wso2.carbon.event.stream.core.EventStreamDeployer} -  Stream definition is deployed successfully  : org.wso2.apimgt.statistics.response:1.0.0 {org.wso2.carbon.event.stream.core.EventStreamDeployer}
TID: [-1234] [] [2016-08-05 10:28:57,282]  INFO {org.wso2.carbon.event.stream.core.EventStreamDeployer} -  Stream definition is deployed successfully  : org.wso2.apimgt.statistics.workflow:1.0.0 {org.wso2.carbon.event.stream.core.EventStreamDeployer}
TID: [-1234] [] [2016-08-05 10:28:57,282]  INFO {org.wso2.carbon.event.stream.core.EventStreamDeployer} -  Stream definition is deployed successfully  : org.wso2.apimgt.statistics.throttle:1.0.0 {org.wso2.carbon.event.stream.core.EventStreamDeployer}
TID: [-1234] [] [2016-08-05 10:28:57,291]  INFO {org.wso2.carbon.event.input.adapter.core.internal.InputAdapterRuntime} -  Connecting receiver EventReceiver_destination {org.wso2.carbon.event.input.adapter.core.internal.InputAdapterRuntime}
TID: [-1234] [] [2016-08-05 10:28:57,292]  INFO {org.wso2.carbon.event.stream.core.internal.EventJunction} -  Producer added to the junction. Stream:org_wso2_apimgt_statistics_destination:1.0.0 {org.wso2.carbon.event.stream.core.internal.EventJunction}
TID: [-1234] [] [2016-08-05 10:28:57,292]  INFO {org.wso2.carbon.event.receiver.core.EventReceiverDeployer} -  Event Receiver configuration successfully deployed and in active state: EventReceiver_destination {org.wso2.carbon.event.receiver.core.EventReceiverDeployer}
TID: [-1234] [] [2016-08-05 10:28:57,293]  INFO {org.wso2.carbon.event.input.adapter.core.internal.InputAdapterRuntime} -  Connecting receiver EventReceiver_fault {org.wso2.carbon.event.input.adapter.core.internal.InputAdapterRuntime}
TID: [-1234] [] [2016-08-05 10:28:57,293]  INFO {org.wso2.carbon.event.stream.core.internal.EventJunction} -  Producer added to the junction. Stream:org.wso2.apimgt.statistics.fault:1.0.0 {org.wso2.carbon.event.stream.core.internal.EventJunction}
TID: [-1234] [] [2016-08-05 10:28:57,293]  INFO {org.wso2.carbon.event.receiver.core.EventReceiverDeployer} -  Event Receiver configuration successfully deployed and in active state: EventReceiver_fault {org.wso2.carbon.event.receiver.core.EventReceiverDeployer}
TID: [-1234] [] [2016-08-05 10:28:57,294]  INFO {org.wso2.carbon.event.input.adapter.core.internal.InputAdapterRuntime} -  Connecting receiver EventReceiver_request {org.wso2.carbon.event.input.adapter.core.internal.InputAdapterRuntime}
TID: [-1234] [] [2016-08-05 10:28:57,294]  INFO {org.wso2.carbon.event.stream.core.internal.EventJunction} -  Producer added to the junction. Stream:org.wso2.apimgt.statistics.request:1.0.0 {org.wso2.carbon.event.stream.core.internal.EventJunction}
TID: [-1234] [] [2016-08-05 10:28:57,294]  INFO {org.wso2.carbon.event.receiver.core.EventReceiverDeployer} -  Event Receiver configuration successfully deployed and in active state: EventReceiver_request {org.wso2.carbon.event.receiver.core.EventReceiverDeployer}
TID: [-1234] [] [2016-08-05 10:28:57,294]  INFO {org.wso2.carbon.event.input.adapter.core.internal.InputAdapterRuntime} -  Connecting receiver EventReceiver_response {org.wso2.carbon.event.input.adapter.core.internal.InputAdapterRuntime}
TID: [-1234] [] [2016-08-05 10:28:57,295]  INFO {org.wso2.carbon.event.stream.core.internal.EventJunction} -  Producer added to the junction. Stream:org.wso2.apimgt.statistics.response:1.0.0 {org.wso2.carbon.event.stream.core.internal.EventJunction}
TID: [-1234] [] [2016-08-05 10:28:57,295]  INFO {org.wso2.carbon.event.receiver.core.EventReceiverDeployer} -  Event Receiver configuration successfully deployed and in active state: EventReceiver_response {org.wso2.carbon.event.receiver.core.EventReceiverDeployer}
TID: [-1234] [] [2016-08-05 10:28:57,295]  INFO {org.wso2.carbon.event.input.adapter.core.internal.InputAdapterRuntime} -  Connecting receiver EventReceiver_workflow {org.wso2.carbon.event.input.adapter.core.internal.InputAdapterRuntime}
TID: [-1234] [] [2016-08-05 10:28:57,295]  INFO {org.wso2.carbon.event.stream.core.internal.EventJunction} -  Producer added to the junction. Stream:org.wso2.apimgt.statistics.workflow:1.0.0 {org.wso2.carbon.event.stream.core.internal.EventJunction}
TID: [-1234] [] [2016-08-05 10:28:57,295]  INFO {org.wso2.carbon.event.receiver.core.EventReceiverDeployer} -  Event Receiver configuration successfully deployed and in active state: EventReceiver_workflow {org.wso2.carbon.event.receiver.core.EventReceiverDeployer}
TID: [-1234] [] [2016-08-05 10:28:57,296]  INFO {org.wso2.carbon.event.input.adapter.core.internal.InputAdapterRuntime} -  Connecting receiver EventReceiver_throttle {org.wso2.carbon.event.input.adapter.core.internal.InputAdapterRuntime}
TID: [-1234] [] [2016-08-05 10:28:57,296]  INFO {org.wso2.carbon.event.stream.core.internal.EventJunction} -  Producer added to the junction. Stream:org.wso2.apimgt.statistics.throttle:1.0.0 {org.wso2.carbon.event.stream.core.internal.EventJunction}
TID: [-1234] [] [2016-08-05 10:28:57,296]  INFO {org.wso2.carbon.event.receiver.core.EventReceiverDeployer} -  Event Receiver configuration successfully deployed and in active state: EventReceiver_throttle {org.wso2.carbon.event.receiver.core.EventReceiverDeployer}
TID: [-1234] [] [2016-08-05 10:28:57,299]  INFO {org.wso2.carbon.analytics.spark.core.SparkScriptCAppDeployer} -  Deploying spark script: APIM_STAT_SCRIPT.xml for tenant : -1234 {org.wso2.carbon.analytics.spark.core.SparkScriptCAppDeployer}
TID: [-1234] [] [2016-08-05 10:28:57,366]  INFO {org.wso2.carbon.ntask.core.impl.AbstractQuartzTaskManager} -  Task scheduled: [-1234][ANALYTICS_SPARK][APIM_STAT_SCRIPT] {org.wso2.carbon.ntask.core.impl.AbstractQuartzTaskManager}
TID: [-1234] [] [2016-08-05 10:28:57,367]  INFO {org.wso2.carbon.analytics.spark.core.SparkScriptCAppDeployer} -  Deploying spark script: APIM_STAT_SCRIPT_THROTTLE.xml for tenant : -1234 {org.wso2.carbon.analytics.spark.core.SparkScriptCAppDeployer}
TID: [-1234] [] [2016-08-05 10:28:57,394]  INFO {org.wso2.carbon.ntask.core.impl.AbstractQuartzTaskManager} -  Task scheduled: [-1234][ANALYTICS_SPARK][APIM_STAT_SCRIPT_THROTTLE] {org.wso2.carbon.ntask.core.impl.AbstractQuartzTaskManager}
TID: [-1234] [] [2016-08-05 10:28:57,396]  INFO {org.wso2.carbon.application.deployer.internal.ApplicationManager} -  Successfully Deployed Carbon Application : APIM_STAT_CAPP_v1.0.3 {super-tenant} {org.wso2.carbon.application.deployer.internal.ApplicationManager}

  1. Go to data explorer window on DAS and make sure you see the tables in drop down. 转到DAS上的数据浏览器窗口,并确保您看到下拉列表。

  2. Restart DAS server to clear up in-memory held information. 重新启动DAS服务器以清除内存中保留的信息。

  3. Publish some stats (invoke APIs) 发布一些统计信息(调用API)

  4. Wait for some time and let analytic scripts run. 等待一段时间,然后运行分析脚本。 If you need to manually run them navigate to main -> Batch Analytics -> Scripts and execute them. 如果您需要手动运行它们,请导航至main-> Batch Analytics-> Scripts并执行它们。

  5. Access API Manager statistics via API Manager publisher/subscriber pages. 通过API Manager发布者/订阅者页面访问API Manager统计信息。 (please see store_analytics.png below) (请参阅下面的store_analytics.png)

在此处输入图片说明

Hope this information helps you. 希望这些信息对您有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM