prom/prometheus container not resolving other containers

133 views
Skip to first unread message

Peter Dwyer

unread,
Mar 23, 2022, 6:46:29 AM3/23/22
to Prometheus Users
Hey,

so i wanted to add a new scraper in a container in the same compose as my prometheus instance. but it seems it cannot resolve the other containers. it even seems to be having some issues resolving internet addresses also. this is not happening with other containers in the compose. using the latest version of the container. 

[root@server Docker-Compose-Prometheus-and-Grafana]# docker-compose exec prometheus /bin/sh
/prometheus $ nslookup caddy.
Server:         127.0.0.11
Address:        127.0.0.11:53

Non-authoritative answer:

*** Can't find caddy.: No answer

/prometheus $ nslookup google.com
Server:         127.0.0.11
Address:        127.0.0.11:53

Non-authoritative answer:
Name:   google.com
Address: 2a00:1450:4009:821::200e

*** Can't find google.com: No answer

/prometheus $
[root@server Docker-Compose-Prometheus-and-Grafana]# docker-compose exec caddy /bin/sh
/srv # nslookup prometheus.
Server:         127.0.0.11
Address:        127.0.0.11:53

Non-authoritative answer:
*** Can't find prometheus.: No answer

Non-authoritative answer:
Name:   prometheus
Address: 10.10.1.3

/srv # nslookup google.com
Server:         127.0.0.11
Address:        127.0.0.11:53

Non-authoritative answer:
Name:   google.com
Address: 2a00:1450:4009:821::200e

Non-authoritative answer:
Name:   google.com
Address: 216.58.212.238

/srv #
Reply all
Reply to author
Forward
0 new messages