WSO2 AM と DAS の両方を同じマシンにインストールし、DAS サーバーのオフセット 3 ( 3) を作成しました。しかし、API マネージャーで統計ダッシュボードを表示できません。
分析を構成します。
DAS は、統計を 5 分間隔で要約するだけです。例: 10:00、10:05、10:10、... (1 日の固定間隔)。したがって、最初の 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 ノードでそれらを確認していただけますか。
以下の手順に従ってください。このステップはすでに完了しているため、スキップします。
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}
DAS のデータ エクスプローラー ウィンドウに移動し、ドロップダウンにテーブルが表示されていることを確認します。
DAS サーバーを再起動して、メモリ内に保持されている情報をクリアします。
いくつかの統計を公開する (API を呼び出す)
しばらく待ってから、分析スクリプトを実行します。手動で実行する必要がある場合は、main -> Batch Analytics -> Scripts に移動して実行します。
API Manager パブリッシャー/サブスクライバー ページから API Manager 統計にアクセスします。(以下の store_analytics.png を参照してください)
この情報がお役に立てば幸いです。