如何通过 Microsoft Power Automate 将触发的 Azure 警报写入一个 note/Excel 文件

How to write triggered Azure alerts to the one note/Excel file via Microsoft Power Automate

我设置了多个 Azure 警报来监控 Azure Web 应用程序性能(4xx、5xx、响应时间)。当任何警报规则触发时,它都会向我的 Microsoft Outlook 电子邮件发出警报。

我想在每次触发这些警报时将这些警报详细信息(例如警报名称、日期和电子邮件主题)写入 One Note 或 Excel 文件中,以便我可以跟踪这些警报。

我试用了 Microsoft Power Automate 工具。他们有一个特定的模板,任何新电子邮件都会收到;它过滤电子邮件主题,然后在 Azure DevOps 上创建 issues/Tasks/Bug。我找不到将某些警报详细信息写入 excel 文件或 One Note 的模板。

有更好的方法吗?

I tried the Microsoft Power Automate tool. They have a specific template where any new email arrives; it filters the email subject and then creates issues/Tasks/Bug on Azure DevOps. I couldn't find a template that writes certain alert details to the excel file or One Note.

根据您的要求,在 power Automate 工具中,我们没有任何预定义模板来记录警报名称、警报触发时间、从电子邮件到 excel sheet直接。

我们已经使用 outlook 连接器在 power automate 中编写了一个自定义工作流程,excel 用于业务连接器,在我们的本地环境中测试了 compose 功能,它运行良好,如下所示

由于警报电子邮件正文采用 Html 格式,我们使用 contentversion 连接器将电子邮件正文转换为文本格式。 后来我们用了compose函数拉取了alert triggered time , subject of the alert 以下是我们在 compose 中用于拉取警报触发时间的表达式,subject
警报触发时间:

first(split(last(split(outputs('Html_to_text_2')?['body'],'at ')),'Rule ID'))

主题:

split(triggerOutputs()?['body/subject'],'Severtiy:3 ')

这里是示例输出以供参考: