2

WSO2 AM と DAS の両方を同じマシンにインストールし、DAS サーバーのオフセット 3 ( 3) を作成しました。しかし、API マネージャーで統計ダッシュボードを表示できません。

分析を構成します。

アナリティクスを構成する

AM の統計: 統計学

4

1 に答える 1

0

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 ノードでそれらを確認していただけますか。

以下の手順に従ってください。このステップはすでに完了しているため、スキップします。

  1. すでに DAS ノードを指している API Manager ノードを開始すると、以下のようにいくつかのストリーム定義が作成されます。WSO2 DAS 管理コンソールに移動し、[メイン] -> [イベント] -> [ストリーム] を開きます。作成されたストリームを削除します。(以下の das_stream.png を参照してください)

ここに画像の説明を入力

  1. [APIM_HOME]/statistics/API_Manager_Analytics_REST.car ファイルを [DAS_HOME]/repository/deployment/server/carbonapps にコピーします。デフォルトでは、フォルダ carbonapps は存在しません。手動で作成する必要があります。完了すると、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. DAS のデータ エクスプローラー ウィンドウに移動し、ドロップダウンにテーブルが表示されていることを確認します。

  2. DAS サーバーを再起動して、メモリ内に保持されている情報をクリアします。

  3. いくつかの統計を公開する (API を呼び出す)

  4. しばらく待ってから、分析スクリプトを実行します。手動で実行する必要がある場合は、main -> Batch Analytics -> Scripts に移動して実行します。

  5. API Manager パブリッシャー/サブスクライバー ページから API Manager 統計にアクセスします。(以下の store_analytics.png を参照してください)

ここに画像の説明を入力

この情報がお役に立てば幸いです。

于 2016-08-08T03:37:02.847 に答える