Azure资源图资源管理器::在时间图中绘制趋势线

wvt8vs2t  于 2022-12-24  发布在  其他
关注(0)|答案(1)|浏览(147)

我正在阅读这篇关于如何在与Azure SQL数据库消耗相关的时间图中绘制趋势线的article
查询如下所示:

AzureMetrics
| where TimeGenerated >= ago(90d)
| where Resource == 'MyDB'
| where MetricName == 'full_backup_size_bytes' // in ('full_backup_size_bytes','diff_backup_size_bytes','log_backup_size_bytes')
| make-series SizeBackupDiffTB=max(Maximum/1024/1024/1024/1024) on TimeGenerated in range(ago(90d),now(), 1d)
| extend (RSquare,Slope,Variance,RVariance,Interception,TrendLine)=series_fit_line(SizeBackupDiffTB)
| render timechart

但Azure门户返回此错误:

Please provide below info when asking for support: timestamp = 2022-12-19T09:09:42.5539654Z, correlationId = 9cfa2a61-7cbe-412d-8e21-20b245a0e7da. (Code:BadRequest)

Details:
Query is invalid. Please refer to the documentation for the Azure Resource Graph service and fix the error before retrying. (Code:InvalidQuery)
ParserFailure (Code:ParserFailure)
ParserFailure (Code:ParserFailure)
ParserFailure (Code:ParserFailure)
ParserFailure (Code:ParserFailure)
ParserFailure (Code:ParserFailure)
ParserFailure (Code:ParserFailure)

我认为问题可能在第二行>=中再次出现。
但这意味着什么?
编辑:我认为问题不止一个,因为它不需要make-seriesrender timechart

但现在误差减小了:

Please provide below info when asking for support: timestamp = 2022-12-19T09:37:04.2221903Z, correlationId = 12157f78-2c92-4820-94d6-f088acf1a5a0. (Code:BadRequest)

Details:
Query is invalid. Please refer to the documentation for the Azure Resource Graph service and fix the error before retrying. (Code:InvalidQuery)
ParserFailure (Code:ParserFailure)
ParserFailure (Code:ParserFailure)
ParserFailure (Code:ParserFailure)
More information on the error can be found here.
i34xakig

i34xakig1#

这可能是未正确反映greater-than的Unicode。应在日志分析中尝试以下操作:

AzureMetrics
| where TimeGenerated >= ago(90d)
| where Resource == 'MyDB'
| where MetricName == 'full_backup_size_bytes' // in ('full_backup_size_bytes','diff_backup_size_bytes','log_backup_size_bytes')
| make-series SizeBackupDiffTB=max(Maximum/1024/1024/1024/1024) on TimeGenerated in range(ago(90d),now(), 1d)
| extend (RSquare,Slope,Variance,RVariance,Interception,TrendLine)=series_fit_line(SizeBackupDiffTB)
| render timechart

相关问题