Monitoring a function for a minimum number of succesful runs over a week.


I need to setup up alerting to alert if a function runs less than 5 times per week. It's using a blob trigger.

I cannot monitor for failures as we may not get sent the blobs, so the function would just not run and not trigger an alert.

Any ideas how to do this?

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,014 questions
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,637 questions
0 comments No comments
{count} votes

Accepted answer
  1. Maxim Sergeev 6,566 Reputation points Microsoft Employee

    Hi there,

    Yes. Log-based alerts are limited to up 2 days.
    If you need a result with a longer time range, as a workaround you can create and run your query in LogicApps and to trigger a notification via LogicApps to where and when you need.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Carlos Solís Salazar 17,786 Reputation points MVP

    Hi @Anonymous

    Thank you for asking this question on the **Microsoft Q&A Platform. **

    First, add a log analytics workspace to your Function App

    Then you must create an alert role with the signal "Custom log search"

    If you have this message
    is because you might not already configure the log analytics or still you don't have data on it.

    Here you must create a query that gives the result that you require.

    After creating the query, you can configure the parameter of your alert.

    Hope this helps!


    Accept Answer and Upvote, if any of the above helped, this thread can help others in the community looking for remediation for similar issues.
    NOTE: To answer you as quickly as possible, please mention me in your reply.

    0 comments No comments

  2. Anonymous

    Hi @Carlos Solís Salazar ,

    That approach only allows for the evaluation of logs over a maximum of two days.


    0 comments No comments