How to create a alert if someone is disabling any function from my function app?

Bharvi Bhut 181 Reputation points
  1. I have created one function app "XYZ".
  2. Inside this function app I have created 2 functions "F1" and "F2".
  3. Now I want to create an alert or notification if user is disabling any function(F1 or F2).

Can someone please help how I can solve this requirement?

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

1 answer

Sort by: Most helpful
  1. AirGordon 7,030 Reputation points

    Fortunately the action of disabling a function causes an Azure Activity Log to be written; ("entity": "/subscriptions/subscriptionid/resourceGroups/gyourRG/providers/Microsoft.Web/sites/yourfunctionapp/functions/yourfunction/properties/state")

    User's image

    Because of this, you can create an alert in the event that someone disables your function.
    I'd encourage you to check your function app's Activity Log and find out who's been disabling your functions 🤪

    The other thing i'd consider is locking down who has access to your resource group, or even deny assignments