Tom*_*rek 10 virtual-machine azure azure-diagnostics azureportal
有没有办法从Azure门户监控可用磁盘空间?
我知道I/O,内存,网络,CPU,.NET,SQL,ASP.NET,IIS等都有各种诊断方法.
但有没有办法看到连接到VM的磁盘上有多少可用空间?
我发现的只是第三方解决方案:
http://cloudmonix.com/blog/how-to-monitor-free-disk-space-on-azure-vms/
但是应该有一些方法可以在不需要第三方软件的情况下看到像磁盘空间这样的基本指标,对吗?
Han*_*onn 15
2019 年更新
这在今天是可能的。若要使用 Azure Monitor 监视每个驱动器的可用磁盘空间,请执行以下操作:
\LogicalDisk(C:)\% Free Space。Percent。来源:Azure 支持。
从适用于 Linux 的 Azure 来宾监视器查看日志:
// Virtual Machine free disk space
// Show the latest report of free disk space, per instance
InsightsMetrics
| where Name == "FreeSpacePercentage"
| summarize arg_max(TimeGenerated, *) by Tags
// arg_max over TimeGenerated returns the latest record
| project TimeGenerated, Computer, Val, Tags
Run Code Online (Sandbox Code Playgroud)
这会导致以下警报查询(您需要AggregatedValue并bin(TimeGenerated, <some time>)在查询中):
InsightsMetrics
| where Name == "FreeSpacePercentage"
| summarize AggregatedValue=arg_min(Val, *) by bin(TimeGenerated, 5min), Tags
Run Code Online (Sandbox Code Playgroud)
要查看任何通用诊断端点的相同内容(感谢 @gabe):
打开此功能后,我可以通过日志查询查看可用磁盘空间:
InsightsMetrics
| where Name == "FreeSpacePercentage"
| summarize AggregatedValue=arg_min(Val, *) by bin(TimeGenerated, 5min), Tags
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
16232 次 |
| 最近记录: |