0

Is it possible to set a Log Analytic Alert to detect if there were no succeeded pipelinerun in the last 7 days?

I have this Kusto Query:

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. So I think it's only taking the last 24 hours.

Ed_Ru
  • 92
  • 9

1 Answers1

0

The max time period is 24 hours. 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.

Ivan Glasenberg
  • 29,865
  • 2
  • 44
  • 60