Home > Software design >  How to periodically run a Azure log query?
How to periodically run a Azure log query?

Time:12-21

I need the count of a particular request from an App that I am running in Azure. I have created a query to do such stuff. Is there any way to periodically run this query and store the result (maybe email it automatically would be great) ? I do the query from App Insights.

CodePudding user response:

Build a small timer-triggered Azure Function, use the Azure Monitor Query SDK and for example an SendGrid output binding to send the mail.

https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-timer?tabs=in-process&pivots=programming-language-csharp

https://learn.microsoft.com/en-us/dotnet/api/overview/azure/monitor.query-readme?view=azure-dotnet

https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-sendgrid?tabs=in-process,functionsv2&pivots=programming-language-csharp

  • Related