turbot/azure_insights

Query: sql_server_audit_policy

Usage

powerpipe query azure_insights.query.sql_server_audit_policy

Steampipe Tables

SQL

select
p ->> 'name' as "Name",
p -> 'properties' -> 'auditActionsAndGroups' as "Audit Actions And Groups",
p ->> 'isAzureMonitorTargetEnabled' as "Is Azure Monitor Target Enabled",
p ->> 'retentionDays' as "Retention Days",
p ->> 'state' as "State",
p ->> 'isStorageSecondaryKeyInUse' as "Is Storage Secondary Key In Use",
p ->> 'storageAccountSubscriptionId' as "Storage Account Subscription ID",
p ->> type as "Type",
p ->> 'id' as "ID"
from
azure_sql_server,
jsonb_array_elements(server_audit_policy) as p
where
lower(id) = $1
and subscription_id = split_part($1, '/', 3);

Dashboards

The query is used in the dashboards: