steampipe plugin install aws

Table: aws_iot_fleet_metric - Query AWS IoT Fleet Metrics using SQL

AWS IoT Fleet Metrics, part of AWS IoT Device Management, allows for the monitoring and management of the status and performance of your IoT device fleet. It enables the definition of custom metrics based on device data reported to AWS IoT Core, such as device states or telemetry data. These metrics are instrumental in providing insights into various aspects of your IoT fleet, aiding in decisions related to device maintenance, operations, and performance optimization.

Table Usage Guide

The aws_iot_fleet_metric table can be utilized to access detailed information about custom metrics defined for IoT device fleets. This table is essential for IoT administrators and analysts who need to oversee fleet performance, status, and operational metrics within AWS.

Examples

Basic info

Retrieve fundamental details about AWS IoT Fleet Metrics, including metric names, associated ARNs, index names, and dates of creation and modification.

select
metric_name,
arn,
index_name,
creation_date,
last_modified_date
from
aws_iot_fleet_metric;
select
metric_name,
arn,
index_name,
creation_date,
last_modified_date
from
aws_iot_fleet_metric;

Group fleet metrics by aggregation type name

Group fleet metrics by their aggregation type name. This query is useful for analyzing metrics across different aggregation types, providing a broader view of fleet data categorization.

select
metric_name,
aggregation_field,
creation_date,
aggregation_type_name,
query_string
from
aws_iot_fleet_metric
group by
aggregation_type_name;
select
metric_name,
aggregation_field,
creation_date,
aggregation_type_name,
query_string
from
aws_iot_fleet_metric
group by
aggregation_type_name;

List fleet metrics updated in the last 30 days

Find fleet metrics that have been updated within the last 30 days. This query assists in identifying recent changes or updates in fleet metric configurations.

select
metric_name,
index_name,
creation_date,
last_modified_date,
query_version,
version
from
aws_iot_fleet_metric
where
last_modified_date >= now() - interval '30 days';
select
metric_name,
index_name,
creation_date,
last_modified_date,
query_version,
version
from
aws_iot_fleet_metric
where
datetime(last_modified_date) >= datetime('now', '-30 days');

Schema for aws_iot_fleet_metric

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
account_idtext=, !=, ~~, ~~*, !~~, !~~*The AWS Account ID in which the resource is located.
aggregation_fieldtextThe field to aggregate.
aggregation_type_nametextThe name of the aggregation type.
aggregation_type_valuesjsonbA list of the values of aggregation types.
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
arntextThe ARN of the fleet metric to describe.
creation_datetimestamp with time zoneThe date when the fleet metric is created.
descriptiontextThe fleet metric description.
index_nametextThe name of the index to search.
last_modified_datetimestamp with time zoneThe date when the fleet metric is last modified.
metric_nametext=The name of the fleet metric to describe.
partitiontextThe AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov).
periodbigintThe time in seconds between fleet metric emissions. Range [60(1 min), 86400(1 day)] and must be multiple of 60.
query_stringtextThe search query string.
query_versiontextThe search query version.
regiontextThe AWS Region in which the resource is located.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
tagsjsonbA map of tags for the resource.
tags_srcjsonbA list of tags currently associated with the thing type.
titletextTitle of the resource.
unittextUsed to support unit transformation such as milliseconds to seconds. The unit must be supported by CW metric (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_MetricDatum.html)
versionbigintThe version of the fleet metric.

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

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

steampipe_export_aws --config '<your_config>' aws_iot_fleet_metric