简体   繁体   English

Azure Resource Graph Explorer::在时间图表中绘制趋势线

[英]Azure Resource Graph Explorer :: Draw a trendline in the time chart

I was reading this article about how to draw a trendline in the time chart related to the Azure SQL Database consumption.我正在阅读这篇关于如何在与 Azure SQL 数据库消耗相关的时间图表中绘制趋势线的文章。

The query is like this:查询是这样的:

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

But the Azure Portal returns this error:但是 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)

I think the problem might recide in the second line >= .我认为问题可能出在第二行>=中。

But what does that means?但这意味着什么?

EDIT: I think there is more than one problem because it doesn't take make-series and render timechart :编辑:我认为问题不止一个,因为它不需要make-seriesrender timechart

在此处输入图像描述

But the error is now reduced:但是错误现在减少了:

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.

This is probably the Unicode for greater-than that is not reflected properly.这可能是greater-than的 Unicode 没有正确反映。 You should try with the following in Log Analytics:您应该在 Log Analytics 中尝试以下操作:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM