amazon-web-services - AWS AMP:502 错误网关:无法代理请求 - WebIdentityErr:检索凭证失败
问题描述
我有 eks 设置并为 prometheus 提供了 aws 托管服务。创建了具有 AMP 完全访问权限(“aps:*”)的策略,并将该策略附加到 EKS 使用的角色。
Prometheus 安装在 eks 上,但无法将指标推送到 Prometheus 托管服务中。
EKS 在 VPC 中配置。
错误:
ts=2021-07-07T00:43:57.951Z caller=dedupe.go:112 component=remote level=warn remote_name=e595f3 url=http://localhost:8005/workspaces/ws-xxxx-xxxx-xxxx/api/ v1/remote_write msg="发送批处理失败,正在重试" err="服务器返回 HTTP 状态 502 错误网关:无法代理请求 - WebIdentityErr:检索凭据失败"
摄取政策:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"aps:*"
],
"Resource": "*"
}
]
}
信任关系:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Federated": "arn:aws:iam::xxxxxx:oidc-provider/oidc.eks.us-east-1.amazonaws.com/id/65ETDGGHD56WTRSDGF"
},
"Action": "sts:AssumeRoleWithWebIdentity",
"Condition": {
"StringEquals": {
"oidc.eks.us-east-1.amazonaws.com/id/65ETDGGHD56WTRSDGF:sub": "system:serviceaccount:test-eks-prometheus:amp-iamproxy-query-service-account"
}
}
}
]
}
有什么帮助吗?
解决方案
从“url=http://localhost:8005/workspaces/ws-xxxx-xxxx-xxxx/api/v1/remote_write”看来您正在尝试使用 sigv4 代理。Prometheus 现在原生支持 sigv4,我建议使用此设置删除一个组件以通过以下方式调试问题
推荐阅读
- php - Laravel:WhereIn不提取任何值
- vb.net - Microsoft.Office.Interop.Excel - 如何在 vb.net 中将 Excel(仅限可见单元格)保存为 CSV
- azure - 两个或多个数据工厂之间的链接服务
- surge.sh - 如何设置一个浪涌.sh 电子邮件
- mysql - 如何根据时间字段删除每个id少于2天的记录
- azure - 使用 Flask 的聊天机器人应用程序可以在本地工作,但不能在 azure web-app 上工作
- opencv - 升级最新版本 OpenCV 4.4.0 后仍然加载以前的版本
- java - 如何在 spring-data-jpa 1.x 中执行多插入
- javascript - 如何在下载管理器中设置 blob uri?
- sql - SQL - 根据最新时间戳查找用户代码