nerdswords / yet-another-cloudwatch-exporter

Prometheus exporter for AWS CloudWatch - Discovers services through AWS tags, gets CloudWatch metrics data and provides them as Prometheus metrics with AWS tags as labels
Apache License 2.0
972 stars 332 forks source link

[BUG] cannot scrap networkELB "HealthyHostCount" metrics if target group is ALB #935

Open JackyHe0 opened 1 year ago

JackyHe0 commented 1 year ago

Is there an existing issue for this?

YACE version

0.51.0

Config file

apiVersion: v1alpha1 sts-region: ap-east-1 discovery: jobs:

Current Behavior

I try to use YACE to scrap NetworkELB's HealthyHostCount metrics. but I found that if there is a NLB which target group set to ALB ( a new function in NLB) , the YACE scraping job will fail. I can see "skipping metric unmatched by associator" error in debug mode.

{"account":"xxxxxxxxxxxxxxx","arn":"arn:aws:iam::xxxxxxxxxxxxxxx:role/xxxxxxxxxxxxxxx","dimensions":[{"Name":"TargetGroup","Value":"targetgroup/xxxxxxxxxxxxxxx/2d707cbb7ac85e1e"},{"Name":"AvailabilityZone","Value":"ap-east-1b"},{"Name":"LoadBalancer","Value":"net/icr18599/09ff67f87446d39d"}],"job_type":"AWS/NetworkELB","level":"debug","metric":"HealthyHostCount","msg":"skipping metric unmatched by associator","region":"ap-east-1","time":"2023-05-09T11:00:05+08:00"} {"account":"xxxxxxxxxxxxxxx","arn":"arn:aws:iam::xxxxxxxxxxxxxxx:role/xxxxxxxxxxxxxxx","job_type":"AWS/NetworkELB","level":"info","msg":"No metrics data found","region":"ap-east-1","time":"2023-05-09T11:00:05+08:00"}

Expected Behavior

No response

Steps To Reproduce

No response

Anything else?

No response

cristiangreco commented 1 year ago

@JackyHe0 thanks for the bug report. Have you already tried running yace with -enable-feature=max-dimensions-associator? This will enable a new resource-matching algorithm that is thought for fixing this kind of issues.

If it doesn't solve the problem, could you please paste the fill output of the debug logs?