Prometheus目标:服务器返回的HTTP状态502坏网关

发布于 2025-01-20 02:58:15 字数 840 浏览 2 评论 0原文

在我的 K8s 集群中,我通过 helm 安装了一个 prometheus 堆栈。

prometheus-community/kube-prometheus-stack --version 34.9.0

在 prometheus“目标”中,某些目标给出以下错误,而其他一些目标正在工作。

<块引用>

服务器返回 HTTP 状态 502 Bad Gateway

请参阅下图以供参考,

服务器返回 HTTP 状态 502 错误网关

如果我们直接尝试矩阵端点,它会在相同端口上提供良好的度量响应(在浏览器中尝试过) (更重要的是,这些不是手动配置,它是由 prometheus stack helm 图表本身自动配置的。)

我比较了 ServiceMonitor 配置、工作和不工作的容器配置 - 一切看起来都一样。

注意

  • 我启用了“Istio”服务网格( istio-injection=enabled )。
  • 所有与普罗米修斯相关的资源都位于同一名称空间“监视”
  • 同一名称空间中的某些资源给出了正确的响应。 (例如: prometheus-stack-kube-prom-kubelet、prometheus-stack-kube-prom-prometheus),而其他人则给出 502 错误。

如何修复它,以及导致错误的原因。

In my K8s Cluster, I have a prometheus stack installed via helm.

prometheus-community/kube-prometheus-stack --version 34.9.0

In the prometheus "targets", some targets giving below error while some others are working.

server returned HTTP status 502 Bad Gateway

See the image below for reference,

server returned HTTP status 502 Bad Gateway

If we try the matrics endpoint directly, it gives metric response fine (tried in browser) on the same ports ( More over these are not manual configuration, its auto configured by the prometheus stack helm chart itself.)

I compared ServiceMonitor configurations, containers configuration of the one working and not working - all seems same.

Notes

  • I have "Istio" Service mesh enabled ( istio-injection=enabled ).
  • All the prometheus related resources are in same namespace "monitoring"
  • Some resources in the same namespace is giving proper response. (ex: prometheus-stack-kube-prom-kubelet, prometheus-stack-kube-prom-prometheus) , while others giving 502 error.

How to fix it, and what causing the error.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文