turbot/ibm_insights

Query: ibm_compute_instance_disk_by_instance_state

Usage

powerpipe query ibm_insights.query.ibm_compute_instance_disk_by_instance_state

SQL

with disks as (
select
case
when i.status <> 'running' then 'unused'
else 'in-use'
end as state
from
ibm_is_instance_disk as d,
ibm_is_instance as i
where
d.instance_id = i.id
)
select
state,
count(*)
from
disks
group by
state;

Dashboards

The query is used in the dashboards: