I've an azure app service, then i want to know when someone scaleup or scales down my service plan i want to know who did that.
I've used the below command but didnt get any logs
az monitor activity-log list --resource-group YourRGName subscriptions/subscription-id/resourceGroups/YourRGName/providers/Microsoft.Web/serverfarms/AppServicePlan --query "[?operationName.value=='Microsoft.Web/serverfarms/write']"
can please someone help me out.
I've an azure app service, then i want to know when someone scaleup or scales down my service plan i want to know who did that.
I've used the below command but didnt get any logs
az monitor activity-log list --resource-group YourRGName subscriptions/subscription-id/resourceGroups/YourRGName/providers/Microsoft.Web/serverfarms/AppServicePlan --query "[?operationName.value=='Microsoft.Web/serverfarms/write']"
can please someone help me out.
Share Improve this question asked Mar 28 at 7:47 HaneeHanee 12 bronze badges 01 Answer
Reset to default 0The reason you're not getting the logs is because, the CLI command is missing the --resource-id
flag before specifying the resource path.
Use the below command to get the logs without any issues.
az monitor activity-log list --resource-group <resource-group-name> --resource-id /subscriptions/subscription-id/resourceGroups/<resource-group-name>/providers/Microsoft.Web/serverfarms/AppServicePlan --query "[?operationName.value=='Microsoft.Web/serverfarms/write']"
Please refer this Msdoc for Azure CLI command. You can see the logs now.
- LocalizedValue indicates the specific changes made to the Azure App Service Plan.
- Caller shows the username of the individual who performed the scale-up or scale-down action.
You can also view the logs in your Azure app service
Go to App service - > Monitoring -> Diagnostic settings -> follow the below steps
In the activity log of your App Service Plan, you can see who scaled it up or down.