Skip to content

[BUG] when using searchTags and ALB discovery, if target group doesn't have item matched searchtags,  #1620

Open
@KimMJ

Description

@KimMJ

Is there an existing issue for this?

  • I have searched the existing issues

YACE version

0.57.0,0.62.1

Config file

apiVersion: v1alpha1
discovery:
  exportedTagsOnMetrics:
    AWS/ApplicationELB:
      - test_cloudwatch_exporter
  jobs:
    - addCloudwatchTimestamp: true
      metrics:
        - name: ActiveConnectionCount
          statistics:
            - Sum
        - name: RequestCountPerTarget
          statistics:
            - Sum
      period: 60
      regions:
        - ap-northeast-2
      roles:
        - roleArn: arn:aws:iam::<REDACTED>:role/cloudwatch-exporter
      searchTags:
        - key: test_cloudwatch_exporter
          value: true
      type: AWS/ApplicationELB

Current Behavior

cloudwatch exporter returns RequestCountPerTarget metric for all Target Group in account.

Expected Behavior

cloudwatch exporter should return RequestCountPerTarget metric for only TargetGroup linked to LoadBalancer which has test_cloudwatch_exporter=true tag

Steps To Reproduce

  1. Make sure two ALB have test_cloudwatch_exporter=true tag
  2. Make sure NO TargetGroup has test_cloudwatch_exporter=true tag
  3. Run yace with this config

Then it returns target group metric for all TG

And then...

  1. Make sure two ALB have test_cloudwatch_exporter=true tag
  2. Make sure any TargetGroup has test_cloudwatch_exporter=true tag
  3. Run yace with this config

Then it returns target group metric correctly.

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions