简体   繁体   English

是否可以为天蓝色指标生成自定义电子邮件报告?

[英]Is it possible to generate custom email report for azure metrics?

My Aim is this: My company has 5 webapps and some other resources running on Microsoft Azure. 我的目标是:我的公司有5个Web应用程序以及一些其他在Microsoft Azure上运行的资源。 An e-mail is to be sent daily that would contain 每天发送一封电子邮件,其中包含

  • CPU and memory utilization of the 5 webapps 5个Web应用程序的CPU和内存利用率
  • DTU percentage of SQL DB SQL DB的DTU百分比
  • Observed capacity of Autoscale 观察到的自动秤容量

Currently this is done manually by taking screenshots of the metrics. 当前,这是通过获取指标的屏幕快照手动完成的。 Could this be automated via API or something else? 可以通过API或其他方式将其自动化吗? I looked into application insights API, but couldn't find the info for SQL databases and auto-scale metrics. 我研究了应用程序见解API,但找不到有关SQL数据库和自动扩展指标的信息。 If someone could just lean me on the right path, that would be great. 如果有人可以将我靠在正确的道路上,那就太好了。 Thanks. 谢谢。

You can use "Azure Monitor REST API". 您可以使用“ Azure Monitor REST API”。

All metrics: Contains DTU/CPU percentage, DTU/CPU limit, physical data read percentage, log write percentage, Successful/Failed/Blocked by firewall connections, sessions percentage, workers percentage, storage, storage percentage, and XTP storage percentage. 所有指标:包含DTU / CPU百分比,DTU / CPU限制,物理数据读取百分比,日志写入百分比,成功/失败/被防火墙连接阻止,会话百分比,工作人员百分比,存储,存储百分比和XTP存储百分比。

https://docs.microsoft.com/en-us/azure/sql-database/sql-database-metrics-diag-logging https://docs.microsoft.com/en-us/azure/sql-database/sql-database-metrics-diag-logging

and also the Azure Monitor REST API reference 以及Azure Monitor REST API参考

https://docs.microsoft.com/en-us/rest/api/monitor/ https://docs.microsoft.com/en-us/rest/api/monitor/

Then simply you can use a logic app to send the email every day. 然后,您只需使用逻辑应用程序每天发送电子邮件即可。

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

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