Course contentsShow
← Cloud and Infrastructure
Lesson 2359 of 2,98950. Compliance and GovernanceFree lesson

Azure Monitor and Activity Logs

Configuring Azure Activity Log, diagnostic settings, and integration with Log Analytics for comprehensive auditing.

Azure Monitor and Activity Logs

You'll learn how to configure Azure Activity Log, diagnostic settings, and integrate with Log Analytics to create a comprehensive auditing and monitoring foundation for your Azure environment.

What Is Azure Monitor?

Azure Monitor is Azure's centralized observability platform that collects, analyzes, and acts on telemetry from your cloud resources. Think of it as your organization's security camera system—it records who did what and when across all your Azure resources.

The Activity Log is a platform log that records subscription-level events: resource creation, deletion, policy changes, and access attempts. Unlike CloudTrail's opt-in model (from previous lessons), Azure Activity Logs are always enabled—you don't turn them on, you just configure where they go.

Configuring Activity Logs and Diagnostic Settings

Activity Logs automatically retain 90 days of events, but for compliance you'll need longer retention:

  1. Export to Log Analytics Workspace: Create a diagnostic setting to stream logs to a workspace where you can query with KQL (Kusto Query Language)
  2. Archive to Storage Account: For cold storage and long-term compliance requirements
  3. Stream to Event Hub: For real-time processing or SIEM integration

Diagnostic settings extend monitoring to resource-specific logs (like database queries or firewall hits). Each resource type publishes different log categories—you enable what's relevant for your compliance needs.

Integration with Log Analytics

Log Analytics becomes your central audit repository. You can query across all resources: AzureActivity | where OperationNameValue contains "delete" finds all deletion operations. Combine Activity Logs with resource diagnostic logs for complete visibility into both control plane (who changed settings) and data plane (who accessed data) operations.

Key Takeaway: Azure Monitor and Activity Logs provide always-on audit trails; configuring diagnostic settings to Log Analytics centralizes compliance evidence and enables powerful querying for security investigations.