【问题标题】:AWS AMP : 502 Bad Gateway: unable to proxy request - WebIdentityErr: failed to retrieve credentialsAWS AMP:502 Bad Gateway:无法代理请求 - WebIdentityErr:检索凭证失败
【发布时间】:2021-09-17 13:45:29
【问题描述】:

我为 prometheus 设置了 eks 并配置了 aws 托管服务。创建了具有 AMP 完全访问权限(“aps:*”)的策略,并将该策略附加到 EKS 使用的角色。

在 eks 上安装了 Prometheus,但它无法将指标推送到 Prometheus 托管服务中。

EKS 在 VPC 中配置。

错误:

ts=2021-07-07T00:43:57.951Z 调用者=dedupe.go:112 组件=远程 级别=警告远程名称=e595f3 url=http://localhost:8005/workspaces/ws-xxxx-xxxx-xxxx/api/v1/remote_write msg="发送批处理失败,正在重试" err="服务器返回HTTP状态 502 Bad Gateway: 无法代理请求 - 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"
        }
      }
    }
  ]
}

有什么帮助吗?

【问题讨论】:

    标签: amazon-web-services prometheus amazon-iam amazon-eks


    【解决方案1】:

    从“url=http://localhost:8005/workspaces/ws-xxxx-xxxx-xxxx/api/v1/remote_write”看来您正在尝试使用 sigv4 代理。 Prometheus 现在原生支持 sigv4,我建议使用此设置删除一个组件来调试问题

    【讨论】:

    • 您的答案可以通过额外的支持信息得到改进。请edit 添加更多详细信息,例如引用或文档,以便其他人可以确认您的答案是正确的。你可以找到更多关于如何写好答案的信息in the help center。
    猜你喜欢
    • 2022-12-01
    • 1970-01-01
    • 1970-01-01
    • 2013-08-04
    • 2014-03-05
    • 2017-08-15
    • 2019-08-24
    • 2013-09-05
    • 2020-10-29
    相关资源
    最近更新 更多