If the metrics are unique to each instance behind the load balancer, the
best practice is to have Prometheus scrape the pods directly.

On Fri, Dec 18, 2020 at 11:16 AM Marcin Burakiewicz <[email protected]>
wrote:

> Hi.
> We have got .NET core application deployed on AKS which exposes an
> endpoint with some custom metrics in Prometheus format. This application is
> deployed on two hosts which are behind a load balancer. The problem with
> load balancer is that whenever Prometheus pulls the metrics from the
> endpoint it gets them randomly from one of these two hosts depending on
> load balancer choice.
>
> My idea to solve this is to push metrics from each of these hosts to
> Prometheus Pushgateway. I'm thinking about setting up separate containers
> in AKS which will act as sidecars - one per host. They will scrape
> Prometheus metrics and send them to the Pushgateway from each host
> independently.
> Please advise me how to scrape and push these metrics to the PushGateway.
> How they can be collected and what tool/library should be used?
>
> Best regards,
> Marcin B.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Prometheus Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/prometheus-users/020b8aa1-ef0e-438e-882e-db7bb8312eb0n%40googlegroups.com
> <https://groups.google.com/d/msgid/prometheus-users/020b8aa1-ef0e-438e-882e-db7bb8312eb0n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/CABbyFmrq-Bx2dAmycUh3OnoNJScPRK%2BOjjRebcSrn-TVDR_5Pw%40mail.gmail.com.

Reply via email to