-
-
Notifications
You must be signed in to change notification settings - Fork 344
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
[BUG] Edge Lambda scraping throw error when adding multiple regions in config #876
Comments
Hi @tyagian, what version of YACE are you running? Can you please make sure to update to latest? (v0.50.0) Your config file contains an unsupported field |
I have removed enableMetricData: true and now I see error after upgrading version v0.50.0
|
I have 2 queries:
|
Yes the error indicates that you're scraping a region where there are no Lambda functions with any tag attached. We might consider changing the log message to "info" rather than "error", but as of today it needs to be logged somehow to signal that there's possibly something wrong with the configuration. In fact, you can just stop scraping the regions where there are no Lambdas maybe?
You can set |
@cristiangreco In that case, when I go to CloudWatch and check, I see metrics data in multiple regions where we actually don't have metrics available. How can I make changes in YACE configuration to allow it to scrape metrics in those regions? Example, if we have lambda functions in us-west-2 but on Lambda@edge traffic comes from us-east-2, CloudWatch shows metrics in us-east-2 but YACE throw error. |
@tyagian can you run yace with Additionally, can you please provide the output of:
|
Sure. May I know where do we have option in yace helm chart to enable debug mode: https://github.com/nerdswords/helm-charts/blob/main/charts/yet-another-cloudwatch-exporter/values.yaml ? |
In the |
Okay, I will try to test in Lab. Meanwhile I also found similar another issue in past asked same query to collect metrics from different regions of edge lambda function : #214 In my case other regions (in which lambda functions don't exist), I have added to the lambda discovery configuration don't have consistent traffic. |
I'm also trying to make Lambda@edge work. However, I'm only getting aws_lambda_info results and all other metrics such as Invocations, Errors etc are not showing up. I'm not getting any results when I try
However, I get results when I run the above command without --recently-active PT3H flag Also, I ran Is there anything else to add other than Lambda and CloudFront configuration in the yace config.yml? |
Any update on this? @cristiangreco |
Hi, can any of you provide a Terraform/CloudFormation example to create necessary test resources? I'm happy to help here. |
I've also realised that Lambda@edge functions don't support tags, so they can't be discovered by yace discovery jobs. |
@cristiangreco The workaround is to use lambda@edge as static job instead of discovery job. Now, we can close this issue after merging this PR. You can make edits in PR. |
Is there an existing issue for this?
Current Behavior
We have EKS cluster deployed in eu-central-1 so
openID is https://oidc.eks.eu-central-1.amazonaws.com/id/xxxxxxxxxxxx
and IAM role policy have these permissions.
{ "Statement": [ { "Action": [ "tag:GetResources", "cloudwatch:*", "cloudwatch:GetMetricData", "cloudwatch:GetMetricStatistics", "cloudwatch:ListMetrics", "lambda:Get*", "lambda:List*", "lambda:Describe*", "lambda:TagResource", ], "Effect": "Allow", "Resource": "*", "Sid": "yacemetricsExporterPolicy" } ], "Version": "2012-10-17" }
Trust relationship in IAM role:
In yace helm value file, service account is defined as:
Now, when I am adding Lambda metrics in config section of helm values.yaml file:
I get error:
{"level":"error","msg":"Resource tag list is empty (in 0xxxxxxxxx). Tags must be defined for lambda to be discovered.","time":"2023-03-22T21:56:10Z"}
but when I keep only - eu-central-1 under regions in config, I don't get any such error.
I have Prometheus running in EKS cluster on eu-central-1.
This is the IAM policy for OIDC.
How do I know where I am lacking permissions to get rid from this error? I am also using edge Lambda.
Expected Behavior
Expected not to get any error.
Steps To Reproduce
explained above
Anything else?
No response
The text was updated successfully, but these errors were encountered: