turbot/steampipe-mod-terraform-oci-compliance

Control: Compute instance monitoring should be enabled

Description

Oracle Cloud Infrastructure Monitoring helps organizations optimize the resource utilization and uptime of their infrastructure and applications. This service provides fine-grained, out-of-the-box metrics and dashboards that equip DevOps, IT, and site reliability engineers (SREs) with the real-time insights to respond to anomalies as they occur. The Monitoring capabilities are concerning Service Metrics, Metrics Explorer, Alarm Status and Definition and Health Checks.

Usage

Run the control in your terminal:

powerpipe control run terraform_oci_compliance.control.compute_instance_monitoring_enabled

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run terraform_oci_compliance.control.compute_instance_monitoring_enabled --share

SQL

This control uses a named query:

select
address as resource,
case
when ((attributes_std -> 'agent_config' -> 'is_monitoring_disabled') is null or
not (attributes_std -> 'agent_config' -> 'is_monitoring_disabled')::boolean)
then 'ok'
else 'alarm'
end as status,
name || case
when ((attributes_std -> 'agent_config' -> 'is_monitoring_disabled') is null or
not (attributes_std -> 'agent_config' -> 'is_monitoring_disabled')::boolean)
then ' has monitoring enabled'
else ' has monitoring disabled'
end || '.' reason
, path || ':' || start_line
from
terraform_resource
where
type = 'oci_core_instance';

Tags