Search code examples
azureazure-functionsazure-blob-storageazure-alerts

Alert when azure function returns a value


I have an azure function that checks if a blob file exists or not. This function returns true or false, and I want to send an alert if the outout is false. (This function is in python)


Solution

  • Given that you haven't provided any sample code, the first thing you should look at is the developer reference to ensure your logs are being created correctly:

    https://learn.microsoft.com/en-us/azure/azure-functions/functions-reference-python?tabs=asgi%2Cazurecli-linux%2Capplication-level#logging

    I'd recommend you look at the Monitor Azure Functions page and ensure you have Application Insights enabled.

    https://learn.microsoft.com/en-us/azure/azure-functions/functions-monitoring

    Then you can use the following guide on how to query and analyse the App Insights data:

    https://learn.microsoft.com/en-us/azure/azure-functions/analyze-telemetry-data

    You may have to timeslice or aggregate the data for failures in x number of minutes.