Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to use metric math #8

Open
arunderwood opened this issue Mar 5, 2020 · 1 comment
Open

Ability to use metric math #8

arunderwood opened this issue Mar 5, 2020 · 1 comment

Comments

@arunderwood
Copy link

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?

@frioux
Copy link
Contributor

frioux commented Mar 6, 2020

There is not currently a way to do this, though I want to add functionality for client side math at some point for metrics that are (for example) in milliseconds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants