turbot/steampipe-mod-oci-insights

Dashboard: OCI Compute Instance Dashboard

This dashboard answers the following questions:

  • How many instances are in each tenancy, compartment, and region?
  • How many public instances are there?
  • How many instances do not have monitoring enabled?
  • What are my most used instances in terms of CPU utilization?
This dashboard contains 4 cards.

Usage

Install the mod:

mkdir dashboards
cd dashboards
powerpipe mod init
powerpipe mod install github.com/turbot/steampipe-mod-oci-insights

Start the Powerpipe server:

steampipe service start
powerpipe server

Open http://localhost:9033 in your browser and select OCI Compute Instance Dashboard dashboard.

You could also snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe dashboard run oci_insights.dashboard.compute_instance_dashboard --share

Queries

This dashboard uses the the following queries:
with compartments as (
select
id,
'root [' || title || ']' as title
from
oci_identity_tenancy
union (
select
c.id,
c.title || ' [' || t.title || ']' as title
from
oci_identity_compartment c,
oci_identity_tenancy t
where
c.tenant_id = t.id and c.lifecycle_state = 'ACTIVE'
)
)
select
c.title as "Title",
count(i.*) as "Instances"
from
oci_core_instance as i,
compartments as c
where
c.id = i.compartment_id and i.lifecycle_state <> 'TERMINATED'
group by
c.title
order by
c.title;

Tags