如何在Azure SQL MI实例上设置警报以监视%的存储空间使用情况?

huangapple go评论50阅读模式
英文:

How to Setup Alert on Azure SQL MI instance for % storage space used?

问题

需要设置警报,如果 Azure SQL MI 实例使用的空间达到 80%,则应该触发警报。在现有的警报指标中,没有提供使用百分比(%)数值的选项。所以,有人知道如何设置关于 Azure MI 使用的空间百分比的警报吗?

英文:

We need to setup Alert if 80% of space used by Azure SQL MI instance then it should be alerted. In existing Alert metrics not provide option to use value in percentage(%). So anyone have any idea how we can setup alert on % space used by azure mi?

答案1

得分: 1

截止目前,设置托管实例警报的可用选项如下,仅如文档中所述:

  • 平均 CPU 百分比
  • IO 读取字节数
  • IO 写入字节数
  • IO 请求计数
  • 保留的存储空间
  • 使用的存储空间
  • 虚拟核心数

存储警报目前仅以计数格式提供。默认情况下,Azure 不提供百分比。

如果您想要计算 SQL MI 中可用空间,请参考这个Stack Overflow 帖子

英文:

As of now, the available options for setting alerts for managed instance are below only as mentioned in document,

  • Average CPU percentage
  • IO bytes read
  • IO bytes written
  • IO requests count
  • Storage space reserved
  • Storage space used
  • Virtual core count
    如何在Azure SQL MI实例上设置警报以监视%的存储空间使用情况?
    Storage alerts are available as of now are in count format only. Percentage is not available by default from azure.
    If you want to calculate available space in sql MI refer this so thread

答案2

得分: 1

如果您已经定义了诊断设置,以便 SQLMI 将其指标发送到日志分析工作区,您可以使用日志搜索警报:

AzureMetrics
| extend p = pack(MetricName, Average)
| summarize bag = make_bag(p) by TimeGenerated
| evaluate bag_unpack(bag)
| extend reserved_storage = reserved_storage_mb
| extend used_storage = storage_space_used_mb
| extend storage_used_percentage = round(100.0 * used_storage / reserved_storage)
| project TimeGenerated, storage_used_percentage, reserved_storage, used_storage
| where storage_used_percentage >= 80
英文:

If you have defined diagnostic settings such that the SQLMI sends its metrics to a log analytics workspace, you can use a log search alert:

AzureMetrics
| extend p = pack(MetricName, Average)
| summarize bag = make_bag(p) by TimeGenerated
| evaluate bag_unpack(bag)
| extend reserved_storage = reserved_storage_mb
| extend used_storage = storage_space_used_mb
| extend storage_used_percentage = round(100.0 * used_storage / reserved_storage)
| project TimeGenerated, storage_used_percentage, reserved_storage, used_storage
| where storage_used_percentage >= 80

huangapple
  • 本文由 发表于 2023年2月6日 17:20:06
  • 转载请务必保留本文链接:https://go.coder-hub.com/75359387.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定