Skip to content

Monitoring & Alerts

Every deployment creates a Log Analytics workspace with cost-conscious defaults:

SettingValue
Namelog-smbrf-smb-{region}
SKUPerGB2018
Daily Cap500 MB
Retention30 days
Resource Grouprg-monitor-smb-{region}

An Automation Account (aa-smbrf-smb-{region}) is linked to the Log Analytics workspace with a SystemAssigned managed identity. Use it for operational runbooks such as:

  • Automated VM patching schedules
  • Custom compliance reporting
  • Resource cleanup scripts
AzureDiagnostics
| where Category == "AzureFirewallNetworkRule"
| where msg_s contains "Deny"
| where TimeGenerated > ago(1h)
| summarize DeniedCount = count()
by bin(TimeGenerated, 5m),
SourceIP = extract(@"(\d+\.\d+\.\d+\.\d+)", 1, msg_s)
| order by TimeGenerated desc
AzureNetworkAnalytics_CL
| where TimeGenerated > ago(24h)
| where FlowStatus_s == "D" // Denied
| summarize Count = count() by DestPort_d, DestIP_s
| order by Count desc
| take 20
AzureDiagnostics
| where TimeGenerated > ago(24h)
| where Level == "Error"
| summarize ErrorCount = count() by ResourceType, Resource
| order by ErrorCount desc
AzureDiagnostics
| where Category == "AzureBackupReport"
| where TimeGenerated > ago(7d)
| project TimeGenerated, OperationName, ResultType, Resource
| order by TimeGenerated desc

A $500/month consumption budget is deployed at subscription scope with these notifications:

ThresholdTypeAction
80% ($400)ForecastEmail to subscription owner
100% ($500)ActualEmail to subscription owner
110% ($550)ActualEmail to subscription owner

Defender is configured at the Free tier (CSPM basics only):

Pricing PlanTierCost
VirtualMachinesFree$0
StorageAccountsFree$0
KeyVaultsFree$0
ArmFree$0

To enable advanced threat protection, upgrade to Defender for Servers Plan 2 (+$15/VM/month).

Key resources have diagnostic settings configured to send logs to the Log Analytics workspace:

  • Key Vault: Audit events, metrics
  • Automation Account: Job logs, DSC logs
  • Azure Firewall: Network rules, application rules (when deployed)

Additional resources (VNets, NSGs, storage) rely on Azure Policy (smb-monitoring-01) to audit for missing diagnostic settings.