监视 Azure AI 视频索引器

当你的关键应用程序和业务流程依赖于 Azure 资源时,你需要监视这些资源的可用性、性能和操作。

本文介绍 Azure AI 视频索引器生成的监视数据。 Azure AI 视频索引器使用 Azure Monitor。 如果你不熟悉所有 Azure 服务普遍使用的 Azure Monitor 功能,请参阅使用 Azure Monitor 监视 Azure 资源

Azure 中的某些服务在 Azure 门户中有一个特殊且醒目的预生成仪表板,提供监视你的服务的入手点。 这些特殊仪表板称为“见解”。

注意

监视功能不适用于试用帐户。 若要更新到 ARM 帐户,请参阅更新 Azure AI 视频索引器帐户

监视数据

Azure AI 视频索引器收集与 Azure 资源监视数据中描述的 其他 Azure 资源相同的监视数据。

有关 Azure AI 视频索引器创建的指标和日志指标的详细信息,请参阅 监视 Azure AI 视频索引器 数据参考

收集和路由

活动日志会自动收集和存储,但你可以使用诊断设置将其路由到其他位置。

在创建诊断设置并将其路由到一个或多个位置之前,不会收集和存储资源日志。

有关使用 Azure 门户、CLI 或 PowerShell 创建诊断设置的详细过程,请参阅创建诊断设置以收集 Azure 中的平台日志和指标。 创建诊断设置时,请指定要收集的日志类别。 Azure AI 视频索引器的类别列在 Azure AI 视频索引器监视数据参考

类别 说明
审核 读/写操作
为日志编制索引 根据需要监视从上传到索引和重新编制索引的索引过程

诊断设置的屏幕截图。

在何处发送日志的屏幕截图。

以下部分将讨论可以收集的指标和日志。

分析指标

目前,Azure AI 视频索引器不支持监视指标。

分析日志

Azure Monitor 日志中的数据以表形式存储,每个表具有自己独有的属性集。

Azure Monitor 中的所有资源日志都具有后跟服务特定字段的相同字段。 Azure Monitor 资源日志架构概述了通用架构:Azure AI 视频索引器资源日志的架构在 Azure AI 视频索引器数据参考中找到

活动日志是 Azure 中的一种平台登录,可用于深入了解订阅级别的事件。 你可以单独查看它或将它路由到 Azure Monitor 日志,然后便可以在其中使用 Log Analytics 执行复杂得多的查询。

有关为 Azure AI 视频索引器收集的资源日志类型的列表,请参阅 监视 Azure AI 视频索引器数据参考

有关 Azure Monitor 日志使用的表列表以及 Log Analytics 可查询的表,请参阅 监视 Azure AI 视频索引器数据参考

示例 Kusto 查询

重要

从 Azure AI 视频索引器帐户菜单中选择“日志”时,Log Analytics 会打开,并将查询范围设置为当前的 Azure AI 视频索引器帐户。 这意味着日志查询只包含来自该资源的数据。 如果要运行包含来自其他 Azure AI 视频索引器帐户的数据的查询或其他 Azure 服务中的数据,请从 Azure Monitor 菜单中选择“日志”。 有关详细信息,请参阅 Azure Monitor Log Analytics 中的日志查询范围和时间范围

以下是可用于帮助监视 Azure AI 视频索引器帐户的查询。

// Project failures summarized by operationName and Upn, aggregated in 30m windows.
VIAudit
| where Status == "Failure"
| summarize count() by OperationName, bin(TimeGenerated, 30m), Upn
| render timechart  
// Project failures with detailed error message.
VIAudit
| where  Status == "Failure"
| parse Description with "ErrorType: " ErrorType ". Message: " ErrorMessage ". Trace" *
| project TimeGenerated, OperationName, ErrorMessage, ErrorType, CorrelationId, _ResourceId
// Display Video Indexer Account logs of all failed indexing operations. 
VIIndexing
// | where AccountId == "<AccountId>"  // to filter on a specific accountId, uncomment this line
| where Status == "Failure"
| summarize count() by bin(TimeGenerated, 1d)
| render columnchart
// Video Indexer top 10 users by operations 
// Render timechart of top 10 users by operations, with an optional account id for filtering. 
// Trend of top 10 active Upn's
VIIndexing
// | where AccountId == "<AccountId>"  // to filter on a specific accountId, uncomment this line
| where OperationName in ("IndexingStarted", "ReindexingStarted")
| summarize count() by Upn
| top 10 by count_ desc
| project Upn
| join (VIIndexing
| where TimeGenerated > ago(30d)
| where OperationName in ("IndexingStarted", "ReindexingStarted")
| summarize count() by Upn, bin(TimeGenerated,1d)) on Upn
| project TimeGenerated, Upn, count_
| render timechart

警报

在监视数据中发现重要情况时,Azure Monitor 警报会主动通知你。 有了警报,你就可以在客户注意到你的系统中的问题之前确定和解决它们。 可以在指标日志活动日志上设置警报。 不同类型的警报各有优缺点。

下表列出了 Azure AI 视频索引器的常见和建议警报规则。

警报类型 条件 说明
日志警报 失败的操作 上传失败时发送警报
//All failed uploads, aggregated in one hour window.
VIAudit
| where OperationName == "Upload-Video" and Status == "Failure"
| summarize count() by bin(TimeGenerated, 1h)