0
0
Azurecloud~20 mins

Diagnostic settings for resources in Azure - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Diagnostic Settings Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Configuration
intermediate
2:00remaining
Identify the correct diagnostic setting configuration to send logs to a Log Analytics workspace
Which of the following JSON snippets correctly configures diagnostic settings for an Azure resource to send logs and metrics to a Log Analytics workspace?
A
{
  "properties": {
    "workspaceId": "/subscriptions/xxxx/resourceGroups/rg1/providers/Microsoft.OperationalInsights/workspaces/logAnalytics1",
    "logs": [
      { "category": "AuditLogs", "enabled": true }
    ],
    "metrics": [
      { "category": "AllMetrics", "enabled": true }
    ]
  }
}
B
{
  "properties": {
    "logAnalyticsWorkspaceId": "/subscriptions/xxxx/resourceGroups/rg1/providers/Microsoft.OperationalInsights/workspaces/logAnalytics1",
    "logs": [
      { "category": "AuditLogs", "enabled": true }
    ],
    "metrics": [
      { "category": "AllMetrics", "enabled": true }
    ]
  }
}
C
{
  "properties": {
    "workspaceId": "/subscriptions/xxxx/resourceGroups/rg1/providers/Microsoft.OperationalInsights/workspaces/logAnalytics1",
    "logs": [
      { "category": "AuditLogs", "enabled": false }
    ],
    "metrics": [
      { "category": "AllMetrics", "enabled": true }
    ]
  }
}
D
}
}  
]    
} eurt :"delbane" ,"scirteMllA" :"yrogetac" {      
[ :"scirtem"    
,]    
} eurt :"delbane" ,"sgoLtiduA" :"yrogetac" {      
[ :"sgol"    
,"1scitylanAgol/secapskrow/sthgisnIlanoitarepO.tfosorciM/sredivorp/1gr/spuorGecruoser/xxxx/snoitpircsbus/" :"dIecapskrow"    
{ :"seitreporp"  
{
Attempts:
2 left
💡 Hint
Look for the correct property name for the Log Analytics workspace and ensure logs are enabled.
service_behavior
intermediate
1:30remaining
Effect of missing retention policy in diagnostic settings
What happens if you configure diagnostic settings for an Azure resource without specifying a retention policy for logs?
ALogs are automatically deleted after 30 days by default.
BLogs are retained for 90 days by default.
CLogs are retained indefinitely until manually deleted.
DLogs are not collected at all without a retention policy.
Attempts:
2 left
💡 Hint
Think about default behavior when retention is not set.
security
advanced
2:30remaining
Securing diagnostic settings data flow
Which configuration ensures that diagnostic logs sent from an Azure resource to a storage account are encrypted and access is restricted?
ADisable encryption but restrict access with firewall rules to trusted IPs only.
BUse a public storage account with no encryption and allow all networks to access it.
CUse customer-managed keys without network restrictions on the storage account.
DEnable storage account encryption with Microsoft-managed keys and configure a private endpoint for the storage account.
Attempts:
2 left
💡 Hint
Consider both encryption and network access controls.
Architecture
advanced
3:00remaining
Designing diagnostic settings for multi-region resource monitoring
You have resources deployed in multiple Azure regions. What is the best approach to centralize diagnostic logs for monitoring and analysis?
ACreate separate Log Analytics workspaces in each region and keep logs isolated per region.
BConfigure each resource to send diagnostic logs to a single Log Analytics workspace in one region.
CSend logs to storage accounts in each region without central aggregation.
DUse Event Hubs to stream logs to an on-premises SIEM system only.
Attempts:
2 left
💡 Hint
Think about ease of analysis and cost efficiency.
🧠 Conceptual
expert
2:30remaining
Understanding diagnostic settings limits and impact
What is the maximum number of diagnostic settings you can configure per Azure resource, and what happens if you exceed this limit?
AYou can configure up to 5 diagnostic settings per resource; attempts to add more will fail with a quota error.
BThere is no limit on diagnostic settings per resource; Azure automatically manages scaling.
CYou can configure up to 10 diagnostic settings per resource; exceeding this causes logs to be dropped silently.
DOnly 1 diagnostic setting is allowed per resource; additional settings overwrite the existing one.
Attempts:
2 left
💡 Hint
Check Azure resource limits documentation for diagnostic settings.