Loading controls...
Control: Compute instances should have monitoring enabled
Description
The compute instance metrics provide data about the activity level and throughput of the instance. These metrics are required to use features such as autoscaling, metrics, alarms, and notifications with compute instances.
Usage
Run the control in your terminal:
powerpipe control run oci_thrifty.control.compute_instance_monitoring_enabled
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run oci_thrifty.control.compute_instance_monitoring_enabled --share
Steampipe Tables
SQL
with instance_monitoring as ( select distinct display_name, config from oci_core_instance, jsonb_array_elements(agent_config -> 'pluginsConfig') as config where config ->> 'name' = 'Compute Instance Monitoring' and config ->> 'desiredState' = 'ENABLED')select v.id as resource, case when l.display_name is null then 'alarm' else 'ok' end as status, case when l.display_name is null then v.title || ' logging disabled.' else v.title || ' logging enabled.' end as reason, coalesce(c.name, 'root') as compartment, v.regionfrom oci_core_instance as v left join instance_monitoring as l on v.display_name = l.display_name left join oci_identity_compartment as c on c.id = v.compartment_idwhere v.lifecycle_state <> 'TERMINATED';