Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

localhost is not accessible from docker container #124

Closed
ankitnayan opened this issue Mar 23, 2023 · 1 comment · Fixed by SigNoz/signoz.io#852
Closed

localhost is not accessible from docker container #124

ankitnayan opened this issue Mar 23, 2023 · 1 comment · Fixed by SigNoz/signoz.io#852
Assignees

Comments

@ankitnayan
Copy link

The example target in Prometheus receiver shows using localhost:8080 as a target but localhost is not accessible from inside of otel-collector container. What would be a good way to solve this?

https://signoz.io/docs/userguide/send-metrics/#enable-a-prometheus-receiver

@prashant-shahi
Copy link
Member

prashant-shahi commented Mar 23, 2023

we could suggest to use 172.17.0.1 for Linux and host.docker.internal for MaOS

Another alternative is to introduce extra_hosts:

    extra_hosts:
      - signoz:host-gateway

When we use the above in docker-compose.yaml, any network calls made to signoz:8080 would be forwarded to 8080 port of the host machine.

@Calm-Rock Calm-Rock transferred this issue from SigNoz/signoz.io May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants