steampipe plugin install azure

Table: azure_compute_virtual_machine_metric_cpu_utilization_hourly - Query Azure Compute Virtual Machine Metrics using SQL

Azure Compute is a service within Microsoft Azure that provides scalable and secure virtual machines. It allows users to deploy and manage applications across a global network of Microsoft-managed data centers. Azure Compute provides a variety of virtual machine configurations to handle different workloads and performance requirements.

Table Usage Guide

The azure_compute_virtual_machine_metric_cpu_utilization_hourly table provides insights into the CPU utilization of Azure Compute Virtual Machines on an hourly basis. As a system administrator or DevOps engineer, explore machine-specific details through this table, including CPU usage patterns, peak usage times, and potential performance bottlenecks. Utilize it to monitor and manage resource allocation, ensuring optimal performance and cost-effectiveness of your Azure Compute resources.

Examples

Basic info

Explore the utilization of virtual machine CPU over time to identify patterns or trends. This could help in efficient resource allocation and performance optimization.

select
name,
timestamp,
minimum,
maximum,
average,
sample_count
from
azure_compute_virtual_machine_metric_cpu_utilization_hourly
order by
name,
timestamp;
select
name,
timestamp,
minimum,
maximum,
average,
sample_count
from
azure_compute_virtual_machine_metric_cpu_utilization_hourly
order by
name,
timestamp;

CPU Over 80% average

Determine the areas in which the average CPU utilization exceeds 80% on Azure's virtual machines. This can be useful for identifying potential performance issues and ensuring efficient resource allocation.

select
name,
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
azure_compute_virtual_machine_metric_cpu_utilization_hourly
where
average > 80
order by
name,
timestamp;
select
name,
timestamp,
round(minimum, 2) as min_cpu,
round(maximum, 2) as max_cpu,
round(average, 2) as avg_cpu,
sample_count
from
azure_compute_virtual_machine_metric_cpu_utilization_hourly
where
average > 80
order by
name,
timestamp;

Schema for azure_compute_virtual_machine_metric_cpu_utilization_hourly

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
averagedouble precisionThe average of the metric values that correspond to the data point.
cloud_environmenttextThe Azure Cloud Environment.
maximumdouble precisionThe maximum metric value for the data point.
minimumdouble precisionThe minimum metric value for the data point.
nametextThe name of the virtual machine.
resource_grouptextThe resource group which holds this resource.
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.
subscription_idtext=, !=, ~~, ~~*, !~~, !~~*The Azure Subscription ID in which the resource is located.
sumdouble precisionThe sum of the metric values for the data point.
timestamptimestamp with time zoneThe time stamp used for the data point.
unittextThe units in which the metric value is reported.

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)" -- azure

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

steampipe_export_azure --config '<your_config>' azure_compute_virtual_machine_metric_cpu_utilization_hourly