你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
本文介绍:
- 可以为此服务收集的监视数据的类型。
- 分析这些数据的方法。
Note
If you're already familiar with this service and/or Azure Monitor and just want to know how to analyze monitoring data, see the Analyze section near the end of this article.
如果具有依赖于 Azure 资源的关键应用程序和业务流程,则需要监视并获取系统的警报。 Azure Monitor 服务会从系统的每个组件收集并聚合指标和日志。 Azure Monitor 提供可用性、性能和复原能力视图,并在出现问题时向你发送通知。 可以使用 Azure 门户、PowerShell、Azure CLI、REST API 或客户端库来设置和查看监视数据。
- 有关 Azure Monitor 的详细信息,请参阅 Azure Monitor 概述。
- 有关监视 Azure 资源的常规方法的详细信息,请参阅使用 Azure Monitor 监视 Azure 资源。
监视可用于标准代理设置中的代理。
Note
此功能目前处于公开预览状态。 此预览版未提供服务级别协议,不建议将其用于生产工作负载。 某些功能可能不受支持或者受限。 有关详细信息,请参阅 Microsoft Azure 预览版补充使用条款。
Important
监视支持目前仅限于 Azure AI Foundry 中心。 不支持 Azure AI Foundry 项目。
Dashboards
Azure AI Foundry 代理服务提供现成仪表板。 有两个关键仪表板用于监视资源:
- AI Foundry 资源视图中的指标仪表板
- Azure 门户中概述窗格中的仪表板
To access the monitoring dashboards, sign in to the Azure portal and then select Monitoring in the left navigation menu, then click Metrics.
Azure Monitor 平台指标
Azure Monitor 为大多数服务提供平台指标。 这些指标是:
- 针对每个命名空间单独定义。
- 存储在 Azure Monitor 时序指标数据库中。
- 轻量级且具备支持准实时警报的能力。
- 用于跟踪资源随时间推移的性能变化。
- 集合:Azure Monitor 自动收集平台指标。 不需要任何配置。
有关可以为 Azure Monitor 中的所有资源收集的所有指标的列表,请参阅 Azure Monitor 中支持的指标。
Azure AI Foundry 代理服务指标
Azure AI Foundry 代理服务与 Azure AI 服务的一个子集有共同点。 下面是 Azure Monitor 上当前可用的指标列表:
| Metric | REST API 中的名称 | Unit | Aggregation | Dimensions | Time Grains | DS Export |
|---|---|---|---|---|---|---|
| Agents | Agents |
Count | 平均值、最大值、最小值、总计(总和) | EventType |
PT1M | No |
| IndexedFiles | IndexedFiles |
Count | 平均值、最大值、最小值、总计(总和) | ErrorCode、Status、VectorStoreId |
PT1M | No |
| Messages | Messages |
Count | 平均值、最大值、最小值、总计(总和) | EventType、ThreadId |
PT1M | No |
| Runs | Runs |
Count | 平均值、最大值、最小值、总计(总和) | AgentId、RunStatus、StatusCode、StreamType |
PT1M | No |
| Threads | Threads |
Count | 平均值、最大值、最小值、总计(总和) | EventType |
PT1M | No |
| Tokens | Tokens |
Count | 平均值、最大值、最小值、总计(总和) | AgentId、TokenType |
PT1M | No |
| ToolCalls | ToolCalls |
Count | 平均值、最大值、最小值、总计(总和) | AgentId、ToolName |
PT1M | No |
分析监视数据
有许多工具可用于分析监视数据。
Azure Monitor 工具
Azure Monitor supports the metrics explorer, a tool in the Azure portal that allows you to view and analyze metrics for Azure resources. 有关更多信息,请参阅使用 Azure Monitor 指标资源管理器来分析指标数据。
Azure Monitor 导出工具
可以使用 用于指标的 REST API 从 Azure Monitor 指标数据库中提取指标数据,将数据从 Azure Monitor 数据提取到其他工具中。 API 支持使用筛选表达式优化检索到的数据。 有关详细信息,请参阅 Azure Monitor REST API 参考。
要开始使用适用于 Azure Monitor 的 REST API,请参阅 Azure 监视 REST API 演练。
Alerts
在监视数据中发现特定情况时,Azure Monitor 警报会主动向你发出通知。 有了警报,你就可以在客户注意到你的系统中的问题之前找出和解决问题。 有关详细信息,请参阅 Azure Monitor 警报。
Azure 资源的常见警报具有许多来源。 Azure Monitor 基准警报 (AMBA) 站点提供了一种半自动的方法来实现重要平台指标警报、仪表板和指南。 该站点适用于持续扩展的 Azure 服务子集,包括属于 Azure 登陆区域 (ALZ) 的所有服务。
通用警报模式对 Azure Monitor 警报通知的使用体验进行了标准化。 有关详细信息,请参阅 常见警报架构。
Metric alerts evaluate resource metrics at regular intervals. 指标警报还可以应用多个条件和动态阈值。
每个组织的警报需求各不相同,并可能随时间而变化。 一般来说,所有警报都应具备可操作性,在发生警报时具有特定的预期响应。 如果警报不需要立即响应,则可以在报表而不是警报中捕获条件。 某些用例可能需要在存在某些错误条件时发出警报。 在其他情况下,可能需要针对在指定时间段内超过特定阈值的错误发出警报。
根据使用 Azure AI Foundry 代理服务开发的应用程序类型, Azure Monitor Application Insights 可能会在应用程序层提供更多监视优势。
Azure AI Foundry 代理服务警报规则
可以为 监视数据参考中列出的任何指标设置警报。
Advisor recommendations
For some services, if critical conditions or imminent changes occur during resource operations, an alert displays on the service Overview page in the portal. You can find more information and recommended fixes for the alert in Advisor recommendations under Monitoring in the left menu. 在正常操作期间,不会显示任何顾问建议。
有关 Azure 顾问的详细信息,请参阅 Azure 顾问概述。
Related content
- 有关为 Azure AI Foundry 代理服务创建的指标和其他重要值的参考,请参阅 监视数据参考 。
- 有关监视 Azure 资源的一般详细信息,请参阅使用 Azure Monitor 监视 Azure 资源。
