0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Power BI で Azure AI Searchのリソースログを視覚化

Posted at

Power BI で Azure AI Searchのログとメトリックを視覚化してみました。こちらの内容です。

Power BI での見え方

ページは4ページあります。全体的にデータ少ないので面白くはないです。

Search

検索関連の画面
image.png

Indexing

image.png

Operations

image.png

Service metrics

image.png

データ

裏ではこんなデータを持っていました。

Metrics

image.png

AzureMetricsをLog Analytics Workspaceで見ます。
image.png

OperationLogs

image.png
image.png

該当するAzureDiagnosticsをLog Analytics Workspaceで見ます。
image.png

ちなみに、Agentic Retrievalを使った場合は、各内部的な検索クエリが出てきます。

kusto
AzureDiagnostics
| project OperationName, Query_s, IndexName_s, Documents_d
| where OperationName == "Query.Search"

image.png

余談ですが、Agentic Retrievalのサンプルを実行し、結果からどんな動きをしたかが確認できます。

for activity in result.activity:
    print(activity)
    if hasattr(activity, 'search_index_arguments'):
        print("search_index_param: "+str(activity.search_index_arguments))

id 1と2が検索部分です。

{'additional_properties': {}, 'id': 0, 'type': 'modelQueryPlanning', 'elapsed_ms': 1686, 'input_tokens': 2083, 'output_tokens': 81}
{'additional_properties': {}, 'id': 1, 'type': 'searchIndex', 'elapsed_ms': 678, 'knowledge_source_name': 'earth-knowledge-source', 'query_time': datetime.datetime(2025, 9, 7, 5, 59, 34, 804000, tzinfo=<isodate.tzinfo.Utc object at 0x7f361d7ebda0>), 'count': 6, 'search_index_arguments': <azure.search.documents.agent._generated.models._models_py3.KnowledgeAgentSearchIndexActivityArguments object at 0x7f35e88b2630>}
search_index_param: {'additional_properties': {}, 'search': 'How to locate lava flows or lava at night', 'filter': None}
{'additional_properties': {}, 'id': 2, 'type': 'searchIndex', 'elapsed_ms': 645, 'knowledge_source_name': 'earth-knowledge-source', 'query_time': datetime.datetime(2025, 9, 7, 5, 59, 35, 450000, tzinfo=<isodate.tzinfo.Utc object at 0x7f361d7ebda0>), 'count': 1, 'search_index_arguments': <azure.search.documents.agent._generated.models._models_py3.KnowledgeAgentSearchIndexActivityArguments object at 0x7f35e88b21b0>}
search_index_param: {'additional_properties': {}, 'search': 'Techniques or tools for finding lava at night', 'filter': None}
{'additional_properties': {}, 'id': 3, 'type': 'semanticReranker', 'elapsed_ms': None, 'input_tokens': 45061}
{'additional_properties': {}, 'id': 4, 'type': 'modelAnswerSynthesis', 'elapsed_ms': 3116, 'input_tokens': 5355, 'output_tokens': 189}

設定

診断設定

メニュー 監視 -> 診断設定 からストレージ アカウントへのアーカイブをONにします。
※事前にストレージアカウントは作成している前提
image.png

この後、こんなコンテナができていました(診断設定後なのか、検索やIndexing実行の後にできているのか未確認)。
image.png

Power BI

この Power BI を使う。

接続はここの内容そのままでした。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?