steampipe plugin install oci

Table: oci_core_instance_metric_cpu_utilization_hourly - Query OCI Core Instance Metrics using SQL

Oracle Cloud Infrastructure (OCI) Core instances provide secure, isolated compute environments for applications. They support a wide range of workloads and offer robust performance. CPU Utilization Metrics provide insights into the CPU usage of these instances, helping in performance monitoring and optimization.

Table Usage Guide

The oci_core_instance_metric_cpu_utilization_hourly table provides insights into the CPU utilization of OCI Core instances on an hourly basis. As a system administrator or DevOps engineer, you can use this table to monitor CPU usage trends, identify potential performance bottlenecks, and make informed decisions about resource allocation and scaling. This table is particularly useful for maintaining optimal performance and ensuring efficient use of resources in your OCI environment.

Examples

Basic info

Explore the performance of your OCI core instances by analyzing their CPU utilization over time. This allows you to understand usage patterns and potentially optimize resource allocation.

select
id,
timestamp,
minimum,
maximum,
average,
sample_count
from
oci_core_instance_metric_cpu_utilization_hourly
order by
id,
timestamp;
select
id,
timestamp,
minimum,
maximum,
average,
sample_count
from
oci_core_instance_metric_cpu_utilization_hourly
order by
id,
timestamp;

CPU Over 80% average

Analyze the settings to understand instances where the CPU usage exceeds 80% on average. This can help in identifying potential performance issues and optimizing resource allocation.

select
id,
timestamp,
round(minimum :: numeric, 2) as min_cpu,
round(maximum :: numeric, 2) as max_cpu,
round(average :: numeric, 2) as avg_cpu,
sample_count
from
oci_core_instance_metric_cpu_utilization_hourly
where
average > 80
order by
id,
timestamp;
select
id,
timestamp,
round(minimum, 2) as min_cpu,
round(maximum, 2) as max_cpu,
round(average, 2) as avg_cpu,
sample_count
from
oci_core_instance_metric_cpu_utilization_hourly
where
average > 80
order by
id,
timestamp;

Schema for oci_core_instance_metric_cpu_utilization_hourly

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
averagedouble precisionThe average of the metric values that correspond to the data point.
compartment_idtextThe ID of the compartment.
idtextThe OCID of the instance.
maximumdouble precisionThe maximum metric value for the data point.
metric_nametextThe name of the metric.
minimumdouble precisionThe minimum metric value for the data point.
namespacetextThe metric namespace.
regiontextThe OCI region in which the resource is located.
sample_countdouble precisionThe number of metric values that contributed to the aggregate value of this data point.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
sumdouble precisionThe sum of the metric values for the data point.
tenant_idtext=, !=, ~~, ~~*, !~~, !~~*The OCID of the Tenant in which the resource is located.
tenant_nametextThe name of the Tenant in which the resource is located.
timestamptimestamp with time zoneThe time stamp used for the data point.
unittextThe standard unit for the data point.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- oci

You can pass the configuration to the command with the --config argument:

steampipe_export_oci --config '<your_config>' oci_core_instance_metric_cpu_utilization_hourly