You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Azure Data Factory自托管Integration Runtime状态变更邮件告警配置求助

解决Azure Data Factory自托管Integration Runtime状态告警的思路

方法一:基于Log Analytics日志查询创建原生告警

这是适配场景的主流方案,利用ADF的诊断日志实现状态监控:

  • 先开启ADF的诊断设置,将IntegrationRuntimeLogs类别日志发送到Log Analytics工作区。
  • 编写Kusto查询语句,筛选出所有非Running状态的自托管IR:
    AzureDiagnostics
    | where ResourceType == "DATAFACTORIES"
    | where Category == "IntegrationRuntimeLogs"
    | where OperationName == "IntegrationRuntimeStatus"
    | parse_json(Properties) as runtimeProps
    | extend RuntimeStatus = runtimeProps.status
    | where RuntimeStatus != "Running"
    | summarize affectedRuntimes = make_set(Resource) by bin(TimeGenerated, 1h)
    
  • 基于该查询创建告警规则:
    • 触发条件设为查询结果计数大于0
    • 评估频率选1小时,时间窗口设1小时,确保每小时检查一次当前状态
    • 关联含邮件接收人的动作组,触发时自动发送告警邮件

方法二:Resource Graph + 逻辑应用实现自定义告警

如果需要更灵活的通知逻辑,可结合资源查询与自动化工具:

  • 编写Resource Graph查询,定位非Running状态的自托管IR:
    az graph query -q "resources 
    | where type == 'Microsoft.DataFactory/factories/integrationRuntimes' 
    | where properties.type == 'SelfHosted'
    | extend runtimeStatus = properties.state 
    | where runtimeStatus != 'Running'
    | project factoryName = split(id, '/')[8], runtimeName = name, runtimeStatus"
    
  • 创建逻辑应用,设置** recurrence 触发器**(每小时执行一次)
  • 在逻辑应用中添加「Azure CLI」动作,执行上述Resource Graph查询
  • 添加条件判断:若查询返回结果不为空,就通过Office 365 Outlook或SendGrid连接器发送邮件通知

注意事项

  • 确保诊断配置正确,Log Analytics工作区能正常接收IR状态日志
  • 可细化查询条件,比如单独针对Limited状态告警,只需将RuntimeStatus != "Running"改为RuntimeStatus == "Limited"
  • 调整告警评估频率和窗口大小,避免重复告警或遗漏状态变化

内容的提问来源于stack exchange,提问作者R. Maier

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.14 12:20:19