WSO2 AM向WSO2 DAS发布信息

时间:2016-06-29 04:24:05

标签: wso2 wso2-am wso2-das

我在同一台机器上安装了WSO2 AM和DAS,并为DAS服务器制作了偏移3(3)。但是在api管理器中看不到统计信息显示板。

配置Google Analytics:

configure Analytics

AM的统计数据: Statistics

1 个答案:

答案 0 :(得分:0)

DAS仅以5分钟为间隔汇总统计信息。例如:10:00,10:05,10:10,......(一天中固定的间隔)。因此,在通过前5分钟(如果当前时间是10:03,它将在10:05发生)之前,将不会在DAS中创建汇总表,并且发布者/商店在此期间无法检索该信息,因此默认将显示图像。在这段时间之后,您将能够在前5分钟的时间间隔内看到统计数据。下一次更新将在另外5分钟后发生,因此您在前5分钟后执行的API调用将在另外5分钟之后包含在统计信息中。因此,您应该能够每隔5分钟查看API使用情况的更新摘要统计信息。

您可以通过登录DAS管理控制台来验证数据是否已发布到DAS,然后转到主选项卡中的数据资源管理器。然后选择表:ORG_WSO2_APIMGT_STATISTICS_REQUEST。您将能够看到已发送的所有API请求的信息。在传递间隔5分钟后,您应该能够看到API_VERSION_USAGE_SUMMARY表,其中存储了发布者和商店从中检索该信息的汇总使用数据。你能否在DAS节点验证它们。

请按照以下步骤操作。已完成此步骤,跳过它。

  1. 当您启动已经指向DAS节点的API Manager节点时,它将创建一些流定义,如下所示。导航到WSO2 DAS管理控制台打开Main - >事件 - >流。删除已创建的任何流。 (请参阅下面的das_stream.png)
  2. enter image description here

    1. 将[APIM_HOME] /statistics/API_Manager_Analytics_REST.car文件复制到[DAS_HOME] / repository / deployment / server / carbonapps。文件夹carbonapps默认不在那里。您需要手动创建。完成后,您将在DAS控制台中看到以下日志。
    2. 
      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. 转到DAS上的数据资源管理器窗口,确保您在下拉列表中看到这些表格。

      2. 重新启动DAS服务器以清除内存中的信息。

      3. 发布一些统计信息(调用API)

      4. 等待一段时间让分析脚本运行。如果您需要手动运行它们,请导航至main - >批量分析 - >脚本并执行它们。

      5. 通过API Manager发布者/订阅者页面访问API Manager统计信息。 (请参阅下面的store_analytics.png)

      6. enter image description here

        希望这些信息对您有所帮助。