AWS Data Stream Parameters

The AWS plugin provides configurable data streams to fetch cost data and service metrics.

Each configurable data stream exposes a set of parameters that lets you filter the data you retrieve. The following information describes the available configurable data streams and their parameters in detail.

Account Cost (Configurable)

Parameter
Description
Metric
Specify the metric name from the AWS Cost Explorer.
Granularity
Select the time interval for the data. Choose from Daily, Monthly, or Hourly.
Group by
Optionally, specify a GroupBy clause group your cost data by Dimension, Tag, or Cost Category to break down costs with more granularity. For example:
[
  {
    "Type": "TAG",
    "Key": "Environment"
  }
]
Filter by
Optionally, specify a filter expression to refine your cost data. For example:
"Dimensions": {
      "Key": "SERVICE",
      "Values": ["Amazon Elastic Compute Cloud - Compute"]
    }

Example

Metric: Amortized Cost | Granularity: Monthly | Group by: {"Key": "SERVICE", "Type": "DIMENSION"}

CloudWatch Metrics

Select a Query method to use. The parameters that display depend on your choice:

By resource

Parameter
Description
Resources
Specify the resources to filter by.
Metric
Specify the name of the CloudWatch metric you want to query.
Statistic
Specify statistics to aggregate data by. You can enter a CloudWatch statistic even if it is not available in the list. See CloudWatch statistics definitions for a description of each of the statistics.
Note

Which statistics are valid can vary depending on the metric. Refer to the AWS documentation page for clarification.

Period
Enter the aggregation period for the metric query, optionally using a unit suffix: s for seconds (default), m for minutes, h for hours.
For example 15m or 2h.
Use custom dimension
Select this check box if you want to apply a custom dimension to the query. Dimensions are filters that identify a specific metric stream.
For example, the metric CPUUtilization can exist for many resources. Specifying a dimensions tells CloudWatch which resource you want.
When selected, the following fields display:
  • Dimension name:
    Specify the CloudWatch dimension names to apply to the metric query. You can specify up to four dimensions, though not all metrics support every dimension combination.
  • Dimension value:
    Specify the value for each dimension. This is typically the identifier of the resource you want to query. The values must correspond to the dimension names provided above.

By namespace

Parameter
Description
Region
Specify the AWS region where your CloudWatch metrics are located.
Cross-account observability
Choose which AWS account to read data from. Linked accounts can only be used if CloudWatch Cross-account observability is enabled for the AWS account. Choose from:
  • Primary AWS account: Uses the account same account used to authenticate AWS when configuring the data source.
  • Linked AWS account: Enables querying of metrics from the account you specify in the Linked account field.
Metric namespace
Specify a metric namespace. Standard AWS namespaces are listed and custom namespaces must be entered manually.
Metric name
Specify the name of the metric to query, such as CPUUtilization, Invocations, or DatabaseConnections
Statistic
Specify statistics to aggregate data by. You can enter a CloudWatch statistic even if it is not available in the list. See CloudWatch statistics definitions for a description of each of the statistics.
Note

Which statistics are valid can vary depending on the metric. Refer to the AWS documentation page for clarification.

Dimension name / Dimension value
Some metrics require dimensions to categorize, filter, or group metrics. Specify up to four Dimension name and Dimension value fields as needed.
The order of the dimensions does not matter, but not all combinations of dimensions return data.
Period
Enter the aggregation period for the metric query, optionally using a unit suffix: s for seconds (default), m for minutes, h for hours.
For example 15m or 2h.

Insights query

Parameter
Description
Region
Select or enter the AWS region in which the CloudWatch Metrics Insights query will be executed.
Query
Enter a CloudWatch Metrics Insights query. Metrics Insights uses a SQL-like syntax to query, filter, group, and aggregate CloudWatch metrics across multiple resources. For example:
SELECT AVG(CPUUtilization)
FROM SCHEMA("AWS/EC2", InstanceId)
GROUP BY InstanceId
ORDER BY AVG() DESC

CloudWatch Logs

Parameter
Description
Region
Specify the AWS region where your CloudWatch logs are located.
Log groups
Specify the name or ARN of each log group you want to query. Press Enter after each entry to add it to the list.
Limit
Enter the maximum number of results to return per query.
Query
Enter a CloudWatch Logs Insights query. Use the syntax supported on the CloudWatch > Logs Insights page in the AWS console. See the documentation on CloudWatch Logs Insights queries for reference.

Timestream Query

Parameter
Description
Region
Specify the AWS region to target.
Query
Enter a Timestream query. Queries must follow Timestream’s SQL syntax, including database, table, measure, and time range references.

Examples

Retrieve CPU utilization over the past hour

SELECT time, measure_value::double AS cpu_utilization
FROM "MetricsDB"."SystemMetrics"
WHERE measure_name = 'cpu_utilization'
  AND time > ago(1h)
ORDER BY time DESC

Aggregate average temperature by device for the last 24 hours

SELECT device_id,
       AVG(measure_value::double) AS avg_temperature
FROM "IoTDB"."SensorReadings"
WHERE measure_name = 'temperature'
  AND time BETWEEN ago(24h) AND now()
GROUP BY device_id

Was this article helpful?


Have more questions or facing an issue?