[英]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.