【问题标题】:Alertmanagers Endpoint not accessible from the Prometheus due to failing Istio-sidecar route由于 Istio-sidecar 路由失败,无法从 Prometheus 访问 Alertmanagers Endpoint
【发布时间】:2021-01-22 15:16:53
【问题描述】:

设置: 我有一个小型 aws k8s 集群,其中基础设施组件部署为 helm 图表。 其中一个组件是令人敬畏的 Prometheus 图表(请参阅 here)。 组件之间的网络通信应该使用 Istio Service Mesh 进行配置。

问题: Prometheus 找到 kube-prometheus-alertmanager k8s 服务的单个端点,然后根据端点的 IP 地址不断尝试与其通信,而不是将其引用为“kube-prometheus-alertmanager..svc.cluster.local”主机。

由于同一节点上的 istio sidecar 并不真正知道 IP,但有为 kube-prometheus-alertmanager..svc.cluster.local 主机定义的出站路由,它没有找到相应的路由并一直告诉prometheus 容器,由于可以找到对应的路由,所以只能提供 404 HTTP 响应。因此,在 prometheus POD 的 istio-proxy sidecar 容器中,我们看到如下行:

[2021-01-22T15:08:54.492Z] "POST /api/v2/alerts HTTP/1.1" 404 NR "-" 0 0 0 - "-" "Prometheus/2.24.0" "62c4ab73-1111-2222-b7d0-9aea26621ec0" "<ENDPOINT_IP>:9093" "-" - - <ENDPOINT_IP>:9093 <kube-prometheus-prometheus_IP>:37178 - -

404 NR“-”清楚地表示边车容器在路由请求时遇到的问题。

愿望: 很高兴听到让 Prometheus 使用 Endpoints 的最佳策略,但要与 Istio 成为朋友。

提前致谢!

【问题讨论】:

  • 为什么要单独部署prometheus?您可以在 istio 上启用它。当然,如果你单独部署它,你必须将它集成到 istio。

标签: prometheus istio endpoint amazon-eks istio-sidecar


【解决方案1】:

我刚刚遇到了同样的问题,所有到 Alertmanager Pod IP 的内部流量都变成了 404。

解决方法:在kube-prometheus-stack values.yml

设置

alertmanager.alertmanagerSpec.listenLocal=True

不知道为什么会这样,但它确实有效。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-04-03
    • 2020-08-13
    • 1970-01-01
    • 2019-01-17
    • 1970-01-01
    • 2015-06-29
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多