Given the impossibility of multiple processes listening on the same port on the same server, you need to add a proxy service that will collect the metrics from all the servers and expose it in one endpoint. You need also to worry about is the unicity of metrics because all apache will be exposing the same metric name you need a way to inject a unique label per apache server before pushing them into the tsdb. tools like https://github.com/rebuy-de/exporter-merger will help but I don't see how you can add a unique label with them. The real XY problem here is why would want to run many apache servers in one machine that is counter-intuitive.
On Mon, Jul 6, 2020 at 4:35 PM Yasmine Mbarek <bm.yasmi...@gmail.com> wrote: > I have more than one apache server on the same machine working on > different ports , is there any way to monitor all of them with only one > service ? > > -- > 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/69a40259-2f21-41d5-8fe5-80f12dbe5db2o%40googlegroups.com > <https://groups.google.com/d/msgid/prometheus-users/69a40259-2f21-41d5-8fe5-80f12dbe5db2o%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 prometheus-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/CALnV8WiJJv0TuBhH4_mpp6gqcPOaosUhg7BeL91x89_pOxG5iA%40mail.gmail.com.