yet-another-cloudwatch-exporter icon indicating copy to clipboard operation
yet-another-cloudwatch-exporter copied to clipboard

[FEATURE] Filter out resources from cloudwatch where null

Open THOM-AwS opened this issue 11 months ago • 2 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Feature description

Our organization has some accounts that have a history of a lot of ec2 running or having been cycled on the account, numbering in the hundreds. It appears that YACE queries is asking each ec2 for metric data, and that is creating a huge bill for those accounts. Is there any feature we can get to filter out metrics in cloudwatch that only contain null values, and save on getmetricdata costs?

What might the configuration look like?

apiVersion: v1alpha1
  sts-region: ap-southeast-2
  discovery:
    exportedTagsOnMetrics:
      ec2:
        - Environment
    jobs:
    - type: ec2
      delay: 120
      roles:
        - roleArn: "arn:aws:iam::1234:role/GrafanaRole"
        - roleArn: "arn:aws:iam::5678:role/GrafanaRole"
        - roleArn: "arn:aws:iam::9101112:role/GrafanaRole"
      regions:
        - ap-southeast-2
      statistics:
        - Minimum
        - Maximum
        - Sum
        - Average
      metrics:
        - name: CPUUtilization
          period: 60
          length: 300
          nilToZero: true
        - name: DiskReadOps
        - ETC

Anything else?

No response

THOM-AwS avatar Mar 25 '24 04:03 THOM-AwS