turbot/oci_insights

Query: objectstorage_bucket_logging_report

Usage

powerpipe query oci_insights.query.objectstorage_bucket_logging_report

SQL

with name_with_region as (
select
concat(configuration -> 'source' ->> 'resource', region) as name_with_region,
is_enabled
from
oci_logging_log
where
lifecycle_state = 'ACTIVE'
)
select
b.name as "Name",
case
when n.is_enabled then 'Enabled'
else null
end as "Logging Status",
t.title as "Tenancy",
coalesce(c.title, 'root') as "Compartment",
b.region as "Region",
b.id as "OCID"
from
oci_objectstorage_bucket as b
left join name_with_region as n on concat(b.name, b.region) = n.name_with_region
left join oci_identity_compartment as c on b.compartment_id = c.id
left join oci_identity_tenancy as t on b.tenant_id = t.id
order by
b.name;

Dashboards

The query is used in the dashboards: