将表的日志数据计划设置为基本或分析

Azure Monitor 日志提供两个日志数据计划,可降低日志引入和保留成本,并根据需要利用 Azure Monitor 的高级功能和分析功能:

  • 默认的“分析”日志数据计划提供完整的分析功能,并使日志数据可用于查询、Azure Monitor 功能(如警报)以及供其他服务使用。
  • “基本”日志数据计划可以节省在日志分析工作区中引入和存储大量详细日志的成本,以用于调试、故障排除和审核,但不用于分析和警报。

本文介绍了 Azure Monitor 的日志数据计划,并解释了如何在日志分析工作区中配置表的日志数据计划。

权限

要设置表的日志数据计划,必须至少具有参与者权限

比较“基本”与“分析”日志数据计划

下表总结了基本和分析日志数据计划。

类别 分析 基本
引流 常规引入成本。 降低的引入成本。
日志查询 完整的查询功能
无额外费用。
基本查询功能
按使用情况付费。
保留 配置从 30 天到两年的保留期 保留时间固定为八天。
将现有表的计划更改为“基本日志”时,Azure 会将超过八天但仍在表的原始保留期内的数据存档
警报 支持。 不支持。

备注

“基本日志”数据计划不适用于旧定价层中的工作区。

何时应使用基本日志?

默认情况下,Log Analytics 工作区中的所有表都是可用于查询和警报的分析表。

在以下情况下为基本日志配置表:

设置表的日志数据计划

将表的计划从“分析”更改为“基本”时,Log Analytics 会立即存档从 8 天前直到表的原始数据保留的所有数据。 换句话说,除非明确修改存档期,否则表的总保留期保持不变。

将表的计划从“基本”更改为“分析”时,更改将立即影响表中的现有数据。

注意

每周可以切换表计划一次。

若要在 Azure 门户中为基本日志或分析日志配置表,请执行以下操作:

  1. 从“Log Analytics 工作区”菜单中,选择“表”。

    “表”屏幕列出了工作区中的所有表。

  2. 选择要配置的表的上下文菜单,然后选择“管理表”。

    Screenshot that shows the Manage table button for one of the tables in a workspace.

  3. 从表配置屏幕上的“表计划”下拉菜单中,选择“基本”或“分析”。

    仅对支持基本日志的表启用“表计划”下拉菜单。

    Screenshot that shows the Table plan dropdown on the table configuration screen.

  4. 选择“保存”。

受支持的表

这些表当前支持基本日志:

使用基于数据收集规则 (DCR) 的日志引入 API 创建的或迁移到该 API 的所有自定义表。

服务
Azure Active Directory AADDomainServicesDNSAuditsGeneral
AADDomainServicesDNSAuditsDynamicUpdates
AADServicePrincipalSignInLogs
API 管理 ApiManagementGatewayLogs
ApiManagementWebSocketConnectionLogs
应用程序网关 AGWAccessLogs
AGWPerformanceLogs
AGWFirewallLogs
适用于容器的应用程序网关 AGCAccessLogs
Application Insights AppTraces
裸机 NCBMSecurityDefenderLogs
NCBMSystemLogs
NCBMSecurityLogs
NCBMBreakGlassAuditLogs
混沌试验 ChaosStudioExperimentEventLogs
Cloud HSM CHSMManagementAuditLogs
容器应用 ContainerAppConsoleLogs
容器见解 ContainerLogV2
容器应用环境 AppEnvSpringAppConsoleLogs
通信服务 ACSCallAutomationIncomingOperations
ACSCallAutomationMediaSummary
ACSCallClientMediaStatsTimeSeries
ACSCallClientOperations
ACSCallRecordingIncomingOperations
ACSCallRecordingSummary
ACSCallSummary
ACSJobRouterIncomingOperations
ACSRoomsIncomingOperations
ACSCallClosedCaptionsSummary
机密账本 CCFApplicationLogs
Cosmos DB CDBDataPlaneRequests
CDBPartitionKeyStatistics
CDBPartitionKeyRUConsumption
CDBQueryRuntimeStatistics
CDBMongoRequests
CDBCassandraRequests
CDBGremlinRequests
CDBControlPlaneRequests
Cosmos DB for MongoDB (vCore) VCoreMongoRequests
Kubernetes 群集 - Azure Arc ArcK8sAudit
ArcK8sAuditAdmin
ArcK8sControlPlane
适用于能源的数据管理器 OEPDataplaneLogs
专用 SQL 池 SynapseSqlPoolSqlRequests
SynapseSqlPoolRequestSteps
SynapseSqlPoolExecRequests
SynapseSqlPoolDmsWorkers
SynapseSqlPoolWaits
DNS 安全策略 DNSQueryLogs
开发中心 DevCenterDiagnosticLogs
DevCenterResourceOperationLogs
数据传输 DataTransferOperations
事件中心 AZMSArchiveLogs
AZMSAutoscaleLogs
AZMSCustomerManagedKeyUserLogs
AZMSKafkaCoordinatorLogs
AZMSKafkaUserErrorLogs
防火墙 AZFWFlowTrace
健康保健 API AHDSMedTechDiagnosticLogs
AHDSDicomDiagnosticLogs
AHDSDicomAuditLogs
密钥保管库 AZKVAuditLogs
AZKVPolicyEvaluationDetailsLogs
Kubernetes 服务 AKSAudit
AKSAuditAdmin
AKSControlPlane
Log Analytics LASummaryLogs
托管 Lustre AFSAuditLogs
托管 NGINX NGXOperationLogs
媒体服务 AMSLiveEventOperations
AMSKeyDeliveryRequests
AMSMediaAccountHealth
AMSStreamingEndpointRequests
Microsoft Graph MicrosoftGraphActivityLogs
监视器 AzureMetricsV2
网络设备(运营商关系) MNFDeviceUpdates
MNFSystemStateMessageUpdates
网络管理器 AVNMConnectivityConfigurationChange
AVNMIPAMPoolAllocationChange
Nexus 群集 NCCKubernetesLogs
NCCVMOrchestrationLogs
Nexus 存储设备 NCSStorageLogs
NCSStorageAlerts
运营商见解 - 数据产品 AOIDatabaseQuery
AOIDigestion
AOIStorage
Redis 缓存 ACRConnectedClientList
Redis Cache Enterprise REDConnectionEvents
中继 AZMSHybridConnectionsEvents
安全性 SecurityAttackPathData
服务总线 AZMSApplicationMetricLogs
AZMSOperationalLogs
AZMSRunTimeAuditLogs
AZMSVNetConnectionEvents
Sphere ASCAuditLogs
ASCDeviceEvents
存储 StorageBlobLogs
StorageFileLogs
StorageQueueLogs
StorageTableLogs
Synapse Analytics SynapseSqlPoolExecRequests
SynapseSqlPoolRequestSteps
SynapseSqlPoolDmsWorkers
SynapseSqlPoolWaits
存储移动程序 StorageMoverJobRunLogs
StorageMoverCopyLogsFailed
StorageMoverCopyLogsTransferred
虚拟网络管理器 AVNMNetworkGroupMembershipChange
AVNMRuleCollectionChange

注意

使用数据收集器 API 创建的表不支持基本日志。

后续步骤