influxdata / influxdata/influxdb

Scraper created during onboarding does not work when running in docker with custom port bindings

Open
#21,937 0 comments 0 reactions 0 assignees View on GitHub
area/2.x area/ui kind/bug wontfix
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

To reproduce, start `influxd` using docker with a custom port binding:

```
docker run -p 9086:8086 influxdb:latest
```

Then, go through the onboarding via the UI (accessed via `http://localhost:9086` in this case) and chose "quick start" - this will result in a scraper being created. The scraper will be set up to use `http://localhost:9086/metrics` as the target, but this won't work, because for the server running inside the docker container `http://localhost:9086` is not valid; it actually needs to be `http://localhost:8086`. Deleting the broken scraper and creating a new scraper with the URL `http://localhost:8086/metrics` works as expected.

It doesn't seem like there's a quick fix for this since it would involve the UI somehow knowing if it is a docker container or not. It may be viable to allow the user to customize/confirm their scraper URL as part of onboarding if they chose the quick start.

Contributor guide

Open the contributing guide

Research direction

Start with the onboarding UI's “quick start” path and the scraper creation it triggers; reproduce the issue with `docker run -p 9086:8086 influxdb:latest`. Done means onboarding no longer creates an unusable target for custom Docker bindings, or lets users confirm and customize the scraper URL before creation.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker
Domain
devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.