Prometheus scrap source IP address

19 views
Skip to first unread message

Vishal

unread,
Jan 22, 2021, 2:25:05 PM1/22/21
to Prometheus Users
Hello,

In our setup, a Prometheus on node 1 scraps from Prometheus on nodes 2 and 3.
Node 1 has 2 IP addresses (.175 and .176) on eth1.

Is it possible for us to select the source IP address anywhere in Prometheus configuration when sending scrap requests to node 2 and node 3?

Sincerely,
Vishal

Vishal

unread,
Jan 22, 2021, 2:28:55 PM1/22/21
to Prometheus Users
Sorry for the typos earlier...

On Friday, January 22, 2021 at 1:25:05 PM UTC-6 Vishal wrote:
Hello,

In our setup, a Prometheus on node 1 scrapes from Prometheus on nodes 2 and 3.
Node 1 has 2 IP addresses (.175 and .176) on eth1.

Is it possible for us to select the source IP address anywhere in Prometheus configuration when sending scrape requests to node 2 and node 3?

Sincerely,
Vishal

Charls P John

unread,
Jan 23, 2021, 12:51:09 AM1/23/21
to Vishal, Prometheus Users
I am not sure whether it work, but did you try prometheus on node1 to listen only on your desired ip?

--
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-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/82c942ec-18f7-41d2-b370-22f47c7787c1n%40googlegroups.com.

Vishal Agrawal

unread,
Jan 23, 2021, 8:27:55 AM1/23/21
to Charls P John, Prometheus Users
Thank you Charles, I did try this and in my particular case it didn't work. I had it listening on .176 but netstat showed .175 as the address being used to create tcp connection. 

Julius Volz

unread,
Jan 23, 2021, 4:20:37 PM1/23/21
to Vishal, Prometheus Users
Hi Vishal,

Setting the source IP / interface to scrape from is not possible unfortunately.

Regards,
Julius

--
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-use...@googlegroups.com.


--
Julius Volz
PromLabs - promlabs.com
Reply all
Reply to author
Forward
0 new messages