Hi Azurin4848484,
Thanks for reaching out to Microsoft Q&A.
- Use Azure Policy to Monitor Pricing Plan: Azure Policy can help you monitor and ensure that resources comply with specific configurations, such as the pricing plan of an Azure App Service Plan.
- Create a custom policy that checks if the pricing tier of your App Service Plan matches the expected value (B1).
- Use a policy definition that evaluates the pricing tier of the App Service Plan.
- Assign the policy to the specific subscription/resource group where the App Service resides.
- Create a Policy Definition: This policy should audit any App Service Plans that are not using the "B1" pricing tier.
- Assign the Policy:
- Assign the policy to your subscription or resource group where the App Service Plan resides.
- Ensure that the Remediation option is enabled (if needed) for automatic fixing.
- Set Up Alerts via Log Analytics:
- Enable Azure Monitor for the App Service Plan to send logs to a Log Analytics workspace.
- Use Log Analytics queries to monitor the pricing plan.
- Configure an Alert Rule:
- Create a new Alert Rule:
- Scope: Select the App Service Plan resource.
- Condition: Set up a query (using the one from Log Analytics) to monitor the pricing plan.
- Action Group: Create an Action Group that includes an email notification and configure the repeating frequency (ex: every hour).
- Set the condition to trigger an alert when the pricing plan does not equal the expected value.
- Create a new Alert Rule:
- Action Group:
- When setting up the Action Group, choose Email/SMS/Push/Voice as the action type.
- Add your email recipients and ensure that the alert is sent repeatedly (hourly) until the issue is resolved.
This will ensure that any deviation from the expected pricing plan triggers an email notification, and you can receive these alerts hourly until it is fixed.
Please 'Upvote'(Thumbs-up) and 'Accept' as an answer if the reply was helpful. This will benefit other community members who face the same issue.