Detection: Monitor Diagnostic Setting Deleted
Overview
Detect when a monitor diagnostic setting in an Azure subscription was deleted. Diagnostic settings are crucial for collecting and analyzing logs and metrics to ensure security and operational visibility. Monitoring these deletions helps prevent the loss of critical monitoring data and ensures compliance with auditing requirements.
References:
Usage
Run the detection in your terminal:
powerpipe detection run azure_activity_log_detections.detection.monitor_diagnostic_setting_deleted
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe detection run azure_activity_log_detections.detection.monitor_diagnostic_setting_deleted --share
SQL
This detection uses a named query:
select tp_timestamp as timestamp, operation_name as operation, resource_id as resource, caller as actor, tp_index :: varchar as subscription_id, resource_group_name as resource_group, tp_id as source_id, status as event_status, *from azure_activity_logwhere operation_name = 'microsoft.insights/diagnosticSettings/delete' and status = 'Succeeded'order by timestamp desc;