Prometheus should not scrape through your load balancer. It should have
direct access to all instances.

On Tue, Jun 9, 2020 at 6:47 AM Hari Yada <[email protected]> wrote:

> Hi Experts,
>
>    I have an application and it is scaled to 3 instances. Using Prometheus
> I would like to scrape the metrics per each instance. for example i would
> like to know how many number of http requests received per instance.
>    so i am exposing a metric like this requests_total {instance_id="xxxxxxx",}
> 9.0. finally i have specified the application url in prometheus config
> file.
>
> * problem that i am facing*:
>
> since the service is load-balanced, when prometheus scrapes it hits one of
> the instance and fetch the metrics. eg: if prometheus hits instance one ,
> at this point in time it will not have the details of instance2 and 3 and
> hence there are
> gaps in the graphs for this scrape interval.
>
> to avoid the above situation, i need to use a persistence store to store
> the metrics for all the instances and when prometheus asks that time i need
> it fetch from the store.
>
> Generally i would like to know what is the recommended way for this kind
> of situation
>
> Best Regards,
> Hari
>
> --
> 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/d3e8bd55-5091-43e1-9302-0ff31b3ec39bo%40googlegroups.com
> <https://groups.google.com/d/msgid/prometheus-users/d3e8bd55-5091-43e1-9302-0ff31b3ec39bo%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/CABbyFmpPX6kM7AEXWhzehwcpOhCxaVXkR4MeG3gO67-MFkgCBw%40mail.gmail.com.

Reply via email to