AZ-305 ยท Logging and monitoring design
Routing logs with diagnostic settings
Diagnostic settings destinations (Log Analytics, Storage account, Event Hubs, partner solutions), when to pick each (query, cheap long-term archive, SIEM/third-party streaming), activity log export.
Key points
- A diagnostic setting routes log categories (or allLogs / audit groups) and metrics to:
- Log Analytics workspace: KQL queries, log alerts.
- Storage account: cheap or immutable archive.
- Event Hubs: streaming to a third-party SIEM; or partner solutions.
- Up to five settings per resource, one destination of each type per setting.
- Storage, Event Hubs: same region as a regional resource.
- Activity log: subscription-level setting.
Source: https://learn.microsoft.com/en-us/azure/azure-monitor/data-collection/diagnostic-settings
Practice questions
How many diagnostic settings can a single Azure resource have?
- 1
- 3
- 5
- 10
Show answer
Answer: C. 5
Each resource supports up to five diagnostic settings. Because one setting can hold only one destination of each type, extra settings are how you reach, for example, two different workspaces.
Which statements about diagnostic setting destinations are true?
- The destination resource must exist before you create the setting
- A storage destination must be in the regional resource's region
- One setting can send the same logs to two different workspaces
- Premium storage accounts are supported as archive destinations
- The destination may be in another subscription given RBAC on both
Show answer
Answer: A. The destination resource must exist before you create the setting, B. A storage destination must be in the regional resource's region, E. The destination may be in another subscription given RBAC on both
The destination must exist first, a storage account must share the region of a regional resource, and the destination may sit in another subscription if the user has RBAC access to both. One setting holds only one destination of each type, so two workspaces need two settings, and Premium storage accounts are not supported.
To get the subscription's activity log into a Log Analytics workspace, you must install Azure Monitor Agent on at least one VM in that subscription.
Show answer
Answer: False
False. The activity log is platform data. You export it with a diagnostic setting at subscription scope (in the portal, Export Activity Logs); no agent is involved, and the data lands in the AzureActivity table.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
