简体   繁体   English

用于检测过去 7 天内没有成功的管道运行的 Log Analytics 警报

[英]Log Analytics alert to detect no succeeded pipelineruns in last 7 days

Is it possible to set a Log Analytic Alert to detect if there were no succeeded pipelinerun in the last 7 days?是否可以设置日志分析警报来检测过去 7 天内是否没有成功的管道运行?

I have this Kusto Query:我有这个 Kusto 查询:

let datafactory_name = "DataFactory_name"; //Substituir por el nombre completo del DataFactory
let pipeline_name = "pipeline_name"; //Substituir por el nombre de la pipeline
let startTime = now(-7d);
let endTime = now();
ADFPipelineRun 
| where ResourceId contains toupper(datafactory_name)
| where PipelineName == pipeline_name
| where Status == "Succeeded"
| where TimeGenerated between (startTime .. endTime) 

But when I configure the signal logic it says "For time window: 28/3/2021 16:38 - 29/3/2021 16:38" if I look the query results on "View result of query in Azure Monitor - Logs" I see only the timerange for the last 24 hours.但是,当我配置信号逻辑时,如果我查看“在 Azure 监视器 - 日志中查看查询结果”上的查询结果,它会显示“时间 window:28/3/2021 16:38 - 29/3/2021 16:38”我只看到过去 24 小时的时间范围。 So I think it's only taking the last 24 hours.所以我认为只需要最后 24 小时。

The max time period is 24 hours.最大时间段为 24 小时。 So in alert rule, you can not do this.所以在警报规则中,你不能这样做。

As a workaround, you can create a time-trigger azure function or azure webjobs , then write the query logic by using Azure Log Analytics REST API -> then write method to send email to alert you. As a workaround, you can create a time-trigger azure function or azure webjobs , then write the query logic by using Azure Log Analytics REST API -> then write method to send email to alert you.

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

相关问题 Azure Log Analytics - 如何查看过去 x 天的日志,但只能在特定时间之间查看? - Azure Log Analytics - How to view logs from last x days but only between certain hours? Azure Monitor / Log Analytics 指标警报查询 - Azure Monitor / Log Analytics metric alert query 从 Log Analytics Workspace 在 Azure 上设置警报 - Set an alert on Azure from Log Analytics Workspace Azure日志分析指标衡量警报 - Azure Log Analytics Metric Measurement Alert 关闭日志分析表架构的 Azure 警报 - Azure Alert off of Log Analytics Table Schema 特定时间的 Log Analytics 警报规则 - Log Analytics alert rule at specific time 在OMS中的Log Analytics中创建警报规则时出错 - Getting error while creating Alert rule in Log Analytics in OMS Azure 日志分析。 使用 ARM 模板创建警报规则 - Azure Log Analytics. Create Alert Rules with ARM Template 如何获取 IIS 启动日志以获取相应 IIS 停止日志中的 Azure Log Analytics 在警报的监视时间段之外 - How to fetch IIS Start log for a corresponding IIS Stop log in Azure Log Analytics outside of Alert's monitoring time period Azure Monitor / Log Analytics 指标警报查询和需要重定向端到端事务详细信息窗口 - Azure Monitor / Log Analytics metric alert query and need to redirect End-to-end transaction details window
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM