|
| 1 | +--- |
| 2 | +title: Monitor Azure AI Foundry Agent Service |
| 3 | +description: Start here to learn how to use Azure Monitor to capture and analyze metrics for your Azure AI Foundry Agent Service. |
| 4 | +ms.date: 06/02/2025 |
| 5 | +ms.custom: horz-monitor, subject-monitoring |
| 6 | +ms.topic: conceptual |
| 7 | +author: aahill |
| 8 | +ms.author: aahi |
| 9 | +ms.service: azure-ai-agent-service |
| 10 | +--- |
| 11 | + |
| 12 | +# Monitor Azure AI Foundry Agent Service |
| 13 | + |
| 14 | +[!INCLUDE [horz-monitor-intro](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-intro.md)] |
| 15 | + |
| 16 | +Monitoring is available for agents in a [standard agent setup](../concepts/standard-agent-setup.md). |
| 17 | + |
| 18 | +> [!IMPORTANT] |
| 19 | +> Monitoring support is currently limited to Azure AI Foundry hubs. Azure AI Foundry projects are not supported. |
| 20 | +
|
| 21 | +## Dashboards |
| 22 | + |
| 23 | +Azure AI Foundry Agent Service provides out-of-box dashboards. There are two key dashboards to monitor your resource: |
| 24 | + |
| 25 | +- The metrics dashboard in the AI Foundry resource view |
| 26 | +- The dashboard in the overview pane within the Azure portal |
| 27 | + |
| 28 | +To access the monitoring dashboards, sign in to the [Azure portal](https://portal.azure.com) and then select **Monitoring** in the left navigation menu, then click **Metrics**. |
| 29 | + |
| 30 | + |
| 31 | +:::image type="content" source="../media/monitoring/dashboard.png" alt-text="Screenshot that shows out-of-box dashboards for a resource in the Azure portal." lightbox="../media/monitoring/dashboard.png" border="false"::: |
| 32 | + |
| 33 | +## Azure monitor platform metrics |
| 34 | + |
| 35 | +Azure Monitor provides platform metrics for most services. These metrics are: |
| 36 | + |
| 37 | +* Individually defined for each namespace. |
| 38 | +* Stored in the Azure Monitor time-series metrics database. |
| 39 | +* Lightweight and capable of supporting near real-time alerting. |
| 40 | +* Used to track the performance of a resource over time. |
| 41 | +* Collection: Azure Monitor collects platform metrics automatically. No configuration is required. |
| 42 | + |
| 43 | +For a list of all metrics it's possible to gather for all resources in Azure Monitor, see [Supported metrics in Azure Monitor](/azure/azure-monitor/platform/metrics-supported). |
| 44 | + |
| 45 | +## Azure AI Foundry Agent Service metrics |
| 46 | +Azure AI Foundry Agent Service has commonality with a subset of Azure AI services. Here's a list of currently available metrics on Azure Monitor: |
| 47 | + |
| 48 | +| **Metric** | **Name in REST API** | **Unit** | **Aggregation** | **Dimensions** | **Time Grains** | **DS Export** | |
| 49 | +|-----------------|----------------------|----------|--------------------------------------------|--------------------------------------------------------|-----------------|---------------| |
| 50 | +| Agents | `Agents` | Count | Average, Maximum, Minimum, Total (Sum) | `EventType` | PT1M | No | |
| 51 | +| IndexedFiles | `IndexedFiles` | Count | Average, Maximum, Minimum, Total (Sum) | `ErrorCode`, `Status`, `VectorStoreId` | PT1M | No | |
| 52 | +| Messages | `Messages` | Count | Average, Maximum, Minimum, Total (Sum) | `EventType`, `ThreadId` | PT1M | No | |
| 53 | +| Runs | `Runs` | Count | Average, Maximum, Minimum, Total (Sum) | `AgentId`, `RunStatus`, `StatusCode`, `StreamType` | PT1M | No | |
| 54 | +| Threads | `Threads` | Count | Average, Maximum, Minimum, Total (Sum) | `EventType` | PT1M | No | |
| 55 | +| Tokens | `Tokens` | Count | Average, Maximum, Minimum, Total (Sum) | `AgentId`, `TokenType` | PT1M | No | |
| 56 | +| ToolCalls | `ToolCalls` | Count | Average, Maximum, Minimum, Total (Sum) | `AgentId`, `ToolName` | PT1M | No | |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | +## Analyze monitoring data |
| 61 | + |
| 62 | +There are many tools for analyzing monitoring data. |
| 63 | + |
| 64 | +### Azure Monitor tools |
| 65 | + |
| 66 | +Azure Monitor supports the [metrics explorer](/azure/azure-monitor/essentials/metrics-getting-started), a tool in the Azure portal that allows you to view and analyze metrics for Azure resources. For more information, see Analyze metrics with Azure Monitor metrics explorer. |
| 67 | + |
| 68 | +## Azure Monitor export tools |
| 69 | + |
| 70 | +You can get data out of Azure Monitor into other tools by using the [REST API for metrics](/rest/api/monitor/operation-groups) to extract metric data from the Azure Monitor metrics database. The API supports filter expressions to refine the data retrieved. For more information, see [Azure Monitor REST API reference](/rest/api/monitor/filter-syntax). |
| 71 | + |
| 72 | +To get started with the REST API for Azure Monitor, see [Azure monitoring REST API walkthrough](/azure/azure-monitor/essentials/rest-api-walkthrough). |
| 73 | + |
| 74 | +## Alerts |
| 75 | + |
| 76 | +Azure Monitor alerts proactively notify you when specific conditions are found in your monitoring data. Alerts allow you to identify and address issues in your system before your customers notice them. For more information, see Azure Monitor alerts. |
| 77 | + |
| 78 | +There are many sources of common alerts for Azure resources. [The Azure Monitor Baseline Alerts (AMBA)](https://aka.ms/amba) site provides a semi-automated method of implementing important platform metric alerts, dashboards, and guidelines. The site applies to a continually expanding subset of Azure services, including all services that are part of the Azure Landing Zone (ALZ). |
| 79 | + |
| 80 | +The common alert schema standardizes the consumption of Azure Monitor alert notifications. For more information, see [Common alert schema](/azure/azure-monitor/alerts/alerts-common-schema). |
| 81 | + |
| 82 | +[Metric alerts](/azure/azure-monitor/alerts/alerts-types#metric-alerts) evaluate resource metrics at regular intervals. Metric alerts can also apply multiple conditions and dynamic thresholds. |
| 83 | + |
| 84 | +Every organization's alerting needs vary and can change over time. Generally, all alerts should be actionable and have a specific intended response if the alert occurs. If an alert doesn't require an immediate response, the condition can be captured in a report rather than an alert. Some use cases might require alerting anytime certain error conditions exist. In other cases, you might need alerts for errors that exceed a certain threshold for a designated time period. |
| 85 | + |
| 86 | +Depending on what type of application you're developing with your use of Azure AI Foundry Agent Service, [Azure Monitor Application Insights](/azure/azure-monitor/overview) might offer more monitoring benefits at the application layer. |
| 87 | + |
| 88 | +### Azure AI Foundry Agent Service alert rules |
| 89 | + |
| 90 | +You can set alerts for any metric listed in the [monitoring data reference](../reference/monitor-service.md). |
| 91 | + |
| 92 | +[!INCLUDE [horz-monitor-advisor-recommendations](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-advisor-recommendations.md)] |
| 93 | + |
| 94 | +## Related content |
| 95 | + |
| 96 | +- See [Monitoring data reference](../reference/monitor-service.md) for a reference of the metrics and other important values created for Azure AI Foundry Agent Service. |
| 97 | +- See [Monitoring Azure resources with Azure Monitor](/azure/azure-monitor/essentials/monitor-azure-resource) for general details on monitoring Azure resources. |
0 commit comments