turbot/oci_insights

Query: objectstorage_bucket_logging_disabled_count

Usage

powerpipe query oci_insights.query.objectstorage_bucket_logging_disabled_count

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
count(b.*) as value,
'Logging Disabled' as label,
case count(b.*) when 0 then 'ok' else 'alert' end as type
from
oci_objectstorage_bucket as b
left join name_with_region as n on concat(b.name, b.region) = n.name_with_region
where
not n.is_enabled or n.is_enabled is null;

Dashboards

The query is used in the dashboards: