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:53Non-authoritative answer:
*** Can't find caddy.: No answer
/prometheus $ nslookup
google.comServer: 127.0.0.11
Address:
127.0.0.11:53Non-authoritative answer:
Name:
google.comAddress: 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:53Non-authoritative answer:
*** Can't find prometheus.: No answer
Non-authoritative answer:
Name: prometheus
Address: 10.10.1.3
/srv # nslookup
google.comServer: 127.0.0.11
Address:
127.0.0.11:53Non-authoritative answer:
Name:
google.comAddress: 2a00:1450:4009:821::200e
Non-authoritative answer:
Name:
google.comAddress: 216.58.212.238
/srv #