-
Notifications
You must be signed in to change notification settings - Fork 395
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
Error creating a collector pod when specifying prometheus labeldrop actions #958
Comments
I think this issue needs to move to the operator repo as the config rewriting there appears to be the cause. The validation triggering the error here is in the Prometheus project and not something the receiver can impact. @open-telemetry/operator-maintainers or @open-telemetry/operator-approvers are you able to transfer this issue? |
Updating with current findings, the |
I am seeing the same issue when specifying a valid Input - Specification:
Output - The operator is creating a configmap where the labelmap actions are transformed into:
Error Message:
cc: @alolita |
@anunarapureddy I am also having the same issue with labelmap |
@CoderPoet @Aneurysm9 @erichsueh3 Is anyone actively looking/working on a fix for this issue? cc: @alolita |
@open-telemetry/operator-maintainers can you please reassign this issue to @anunarapureddy Thanks! |
Looks like I found issue here https://github.com/prometheus/prometheus/blob/main/model/relabel/relabel.go.
metric_relabel_configs expects only regex field but actual config is overwritten by DefaultRelabelConfig which is returning error from below if condition.
|
|
Looks like the cause of the issue is clear. Is anyone working on a fix? |
@matej-g I believe @anunarapureddy is working on a fix, we were having a discussion in the slack about it |
…r is enabled (#1712) * Code fix for issues #1623, #1622, #958 * updated the PR with an alternative logic to fi the relabel config issue * fixed codelint issues * reverted the logic to update scrape_configs * fixed unit test case failures * fixed code lint issues * changes to replace_config to handle unamrshalling issue when tarallocatorewrite flag is enabled * fixed unit test case failure * updated e2e test to cover labelkeep usecase * updated unit test to escape $ signs * updated unit test to cover missing and invalig configs * resolved merge conflicts * updated tests, refactored logic based on the new commits * uncommented labeldrop e2e test * added back target allocator attribute * comment for unescaping TA config * updated the README document to reflect the traslations * updated the README document to reflect the traslations * updated the TA config section in the README document * addressed the review comment on README doc --------- Co-authored-by: Jacob Aronoff <jaronoff97@users.noreply.github.com>
…r is enabled (open-telemetry#1712) * Code fix for issues open-telemetry#1623, open-telemetry#1622, open-telemetry#958 * updated the PR with an alternative logic to fi the relabel config issue * fixed codelint issues * reverted the logic to update scrape_configs * fixed unit test case failures * fixed code lint issues * changes to replace_config to handle unamrshalling issue when tarallocatorewrite flag is enabled * fixed unit test case failure * updated e2e test to cover labelkeep usecase * updated unit test to escape $ signs * updated unit test to cover missing and invalig configs * resolved merge conflicts * updated tests, refactored logic based on the new commits * uncommented labeldrop e2e test * added back target allocator attribute * comment for unescaping TA config * updated the README document to reflect the traslations * updated the README document to reflect the traslations * updated the TA config section in the README document * addressed the review comment on README doc --------- Co-authored-by: Jacob Aronoff <jaronoff97@users.noreply.github.com>
This should have been resolved by #1712 please let me know if you are still experiencing issues on the latest versions. |
…r is enabled (open-telemetry#1712) * Code fix for issues open-telemetry#1623, open-telemetry#1622, open-telemetry#958 * updated the PR with an alternative logic to fi the relabel config issue * fixed codelint issues * reverted the logic to update scrape_configs * fixed unit test case failures * fixed code lint issues * changes to replace_config to handle unamrshalling issue when tarallocatorewrite flag is enabled * fixed unit test case failure * updated e2e test to cover labelkeep usecase * updated unit test to escape $ signs * updated unit test to cover missing and invalig configs * resolved merge conflicts * updated tests, refactored logic based on the new commits * uncommented labeldrop e2e test * added back target allocator attribute * comment for unescaping TA config * updated the README document to reflect the traslations * updated the README document to reflect the traslations * updated the TA config section in the README document * addressed the review comment on README doc --------- Co-authored-by: Jacob Aronoff <jaronoff97@users.noreply.github.com>
Describe the bug
I am seeing this error
2022/05/31 17:54:37 application run finished with error: failed to get config: cannot unmarshal the configuration: error reading receivers configuration for "prometheus": prometheus receiver failed to unmarshal yaml to prometheus config: labeldrop action requires only 'regex', and no other fields
This is happening when I am loading valid prometheus configurations into the opentelemetrycollector resource.
I am specifying the label drop actions like this.
The operator is creating a configmap called adot-collector where the labeldrop actions are transformed into this
Compared to how I defined this, the operator is adding the fields "replacement", and "separator". These fields the operator is adding is causing the error in the logs above.
I was able to fix this issue by removing the label drop commands from my config and redeploying.
Steps to reproduce
Create a opentelemetrycollector object in statefulset mode with the targetAllocator enabled. configure the prometheus receiver to scrape a prometheus endpoint and use the metric_relabel_config field to drop a label. Observe the creation of the collector pod and the configmap generated by the operator.
What did you expect to see?
I expected to see the opentelemetry-operator crate a collector pod successfully.
What did you see instead?
I saw that the opentelemetry-operator created the pod Adot-collecotr-0. It was in a crashback loop. I looked at the logs and saw this message
When i looked at eh configmap created by the operator. The labeldrop action had additional keys ("replacement", "seperator") that I had not added.
What version did you use?
Version: (e.g.,
v0.4.0
,1eb551b
, etc)the opentelemetry helm charts. opentelemetry-collector-0.17.0
What config did you use?
Environment
EKS 1.20 cluster
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: