Skip to content

Ability to use metric math #8

@arunderwood

Description

@arunderwood

Is it possible to perform metric math operations with how the current config JSON is structured? I ask because certain AWS account information can only be retrieved via metric math.

For instance, if I want to export the used percentage of my KMS:DescribeKey quota, I need to call the function SERVICE_QUOTA() on the KMS:DescribeKey metric. To illustrate this, here is a description of a CloudWatch Dashboard that displays the metric:

{
    "metrics": [
        [ { "expression": "100 * m1 / SERVICE_QUOTA(m1)", "label": "Utilization %", "id": "e1", "region": "us-east-1" } ],
        [ "AWS/Usage", "CallCount", "Resource", "DescribeKey", "Service", "KMS", "Type", "API", "Class", "None", { "id": "m1", "visible": false } ]
    ],
    "period": 1,
    "units": "None",
    "stat": "Sum",
    "view": "timeSeries",
    "stacked": false,
    "title": "DescribeKey request rate - (Utilization %)",
    "region": "us-east-1"
}

https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/using-metric-math.html#metric-math-syntax
https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricData.html

Is it possible to export metrics like this with Cloudwatching?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions