Azure Monitor监控系统的内存使用率方法

发布时间:2020-05-28 15:29:46 作者:鸽子
来源:亿速云 阅读:286

查询收集到的数据

我们可以使用如下查询语句,查询内存剩余内存小于1024MB的服务器

let setMBValue = 1024;
let startDate = ago(12h);
// enter how many days/hours to look back on
Perf
| where TimeGenerated > startDate
| where ObjectName == "Memory" and CounterName == "Available MBytes Memory" and Computer in ((Heartbeat
| distinct Computer))
| extend FreeMemory = CounterValue
| summarize FreeMemoryMB = min(FreeMemory) by Computer
| where FreeMemoryMB < setMBValue
| summarize max(FreeMemoryMB) by Computer
| join
(
Perf
| where TimeGenerated > startDate
| where ObjectName == "Memory" and CounterName == "Available MBytes Memory" and Computer in ((Heartbeat
| distinct Computer))
| extend FreeMemory = CounterValue
)
on Computer
| make-series Free_Memory_MB = min(FreeMemory) on TimeGenerated from ago(8h) to now() step 2h by Computer
| render timechart

Azure Monitor监控系统的内存使用率方法

创建Alert
如果我们想要设置邮件,短信等报警规则,可以通过“+ New alert rule”来创建:
Azure Monitor监控系统的内存使用率方法

创建完成Alert以后,当系统的可用内存低于1024MB时,我们就会收到警报:
Azure Monitor监控系统的内存使用率方法
Azure Monitor监控系统的内存使用率方法

将性能图表固定到仪表板
统一我们也可以通过点击查询窗口右上方的“固定”按钮,然后选择我们要将图标展示在那个Dashboard,来将查询结果展示到Azure Dashboard:
Azure Monitor监控系统的内存使用率方法

推荐阅读:
  1. 使用Azure Monitor从Azure VM收集数据
  2. Azure Monitor可以用来干什么

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

azure monitor

上一篇:mysql select后面的子查询应该如何使用

下一篇:如何部署MHA实现MySQL高可用

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》