简体   繁体   English

如何从 Azure Log Analytics 查询结果发送群组电子邮件?

[英]How to send group email from Azure Log Analytics Query result?

My Requirement: I need to send log analytics query result to Group Email basically we are using Azure Data Factories to log all " Pipeline Metrics " and " Activity Metrics ".我的要求:我需要将日志分析查询结果发送到 Group Email 基本上我们使用 Azure Data Factories 来记录所有“管道指标”和“活动指标”。 To send Email I setup one rule and one "Action Group" and for this "Action Group" initially i setup my Emailid then i Received Email Successfully.However when i give Group Email Id(basically i created one group in outloook) it is not sending.要发送电子邮件,我设置了一个规则和一个“操作组”,对于这个“操作组”,最初我设置了我的 Emailid,然后我成功地收到了电子邮件。但是,当我提供组电子邮件 ID(基本上我在 outloook 中创建了一个组)时,它不是发送。 Otherway i tried the below solution to send group Email否则我尝试了以下解决方案来发送群组电子邮件

1.If i select " Contributor " Role for " Action Group " then it is sending email to all contributor roles . 1.如果我为“行动组”选择“贡献者”角色,那么它会向所有贡献者角色发送电子邮件。
2. But i want to send email to these roles " Monitoring Contributor " or " Monitoring Reader " or " Reader " . 2. 但我想给这些角色“监控贡献者”或“监控读者”或“读者”发送电子邮件。 I tried, but didn't Received mails.我试过了,但没有收到邮件。

we tried Logic Apps to send Group Email.我们尝试使用 Logic Apps 发送群组电子邮件。 It worked basically But we don't want use Logic Apps(cost issue).它基本上有效但我们不想使用逻辑应用程序(成本问题)。

So, I want solution to send Group Email.所以,我想要发送群组电子邮件的解决方案。

Query :询问 :


ADFPipelineRun
|join
(
    ADFActivityRun
    |where Status == "Succeeded"  or Status == "Failed"
    |project ActivityStatus = Status,PipelineRunId,ActivityRunId ,ActivityName,ActivityStartTime=Start ,ActivityEndTime=End,FailureReason=ErrorMessage 
)
on $left.CorrelationId == $right.PipelineRunId
|project PipelineName,ActivityName,ActivityStatus,ActivityStartTime,ActivityEndTime,FailureReason

Here is image for action group role selection:这是操作组角色选择的图像: 在此处输入图片说明

Please help me out from this problem.请帮我解决这个问题。 Thanks in advance!提前致谢!

Not very sure if adding an (O365) Group email to an Action group would land the alert notification email correctly.不太确定将 (O365) 组电子邮件添加到操作组是否会正确发送警报通知电子邮件。

But I've tested the same with an Outlook Distribution Group and verified that the alert notification email was successfully sent when the alert was fired.但我已经对Outlook 通讯组进行了相同的测试,并验证了在触发警报时已成功发送警报通知电子邮件。

Unless you have a specific reason to do so, I'd suggest to use an appropriate DG for alert configuration.除非您有特定的理由这样做,否则我建议使用适当的 DG 进行警报配置。

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

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