We have a few Azure functions that we expect to get hit at least once every working day. Looking through the alerts, I'm not seeing anything that is jumping out that would alert us if there is no activity for a function.
I haven't had much luck searching for 'alert when no activity' either, so I'm wondering if any of you folks have done this or might be able to point me in the right direction.
Thank you
Assume you have the following azure function, and it is connected an application insights:
Then you can use the query below to check if the function instance(BlobTrigger1 in this example) is called or not in Application insights(Note that the sdkVersion may change for v1 / v2 / v3 azure function, you should check it by yourself):
Then in Azure monitor -> alerts, for "RESOURCE", select your Application insights; for "CONDITION", select "Custom log search":
Then in "Custom log search", set the setting as per screenshot below:
And configure other settings, after that you will be alerted if the function instance is not called within 24 hours.