Whether this is possible at all depends on your Kubernetes network setup.
What are you using there?

Can you ping and curl a pod by hand, using its IP, from the Prometheus box?
If so, you can use relabeling to set __address__ based on
__meta_eureka_app_instance_ip_addr and __meta_eureka_app_instance_port.

If your pods are not individually reachable from outside the cluster (this
is usually the case if you are using an overlay network), you will have to
make it somehow possible for Prometheus. The easiest way may be to run it
in Kubernetes itself as well.

/MR




On Fri, Mar 5, 2021, 11:01 fernando dominguez <florenzo.doming...@gmail.com>
wrote:

> hi all,
> i'm trying to configure  prometheus with eureka running in kubernetes
> cluster
> my configuration is
> 1 prometheus server outside kubernetes cluster
> 1 eureka app running in kubernetes cluster
> 1-n apps running in kubernetes cluster
>
> apps are instrumentalized with micrometer library
> eureka is registering apps
> in external prometheus i configured a eureka sd_eureka pointing to eureke
> ingress route configured in kubernetes cluster and i can get all apps
> properties
> but my problem is that  i can't get metrics for my apps because
> the url metrics is the internal pod configured in kubernetes  and it cant
> be reachable out of cluster.
>
> someone can help me with it or point me in the right direction
>
> thanks in advanced
>
> --
> 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 prometheus-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/prometheus-users/CAC_bq%3DX%2BJQyx4cYeFRB-ZftrjzEW3s18pv3E8jZkhODDauumHg%40mail.gmail.com
> <https://groups.google.com/d/msgid/prometheus-users/CAC_bq%3DX%2BJQyx4cYeFRB-ZftrjzEW3s18pv3E8jZkhODDauumHg%40mail.gmail.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 prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/CAMV%3D_gZKD8O5dsmARqK%3D4KPNfPXJBaZamVEYU8%2BDHK7J2Zfukw%40mail.gmail.com.

Reply via email to