Querying activity logs
Activity logs help you understand changes and operations made at the resource level so that you can verify the author of any modification or auditing operations. Browsing that log in the Azure portal is handy in simpler scenarios but will become cumbersome when you’re trying to find a specific entry that is buried among similar logged items. In this section, we’ll learn how to query the activity log using the Azure CLI, which will simplify your day-to-day activities. Let’s see some examples to get a better understanding of this topic.
Using the Azure CLI to query activity logs
To query an activity log in the Azure CLI, we’ll use the following group of commands:
az monitor activity-log list
The log can be queried by scoping results to either a resource group or resource identifier. The latter is useful if you want to further limit results returned by the command. For example, if you’d like to see logs for a resource...