influxdata / influxdata/influxdb

Basepath not used for generated telegraf url

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

Description

__Steps to reproduce:__

1. Compile influxdb with custom basepath "/influxdb"
2. Set reverse proxy configuration accordingly so that the application is running under https://10.52.126.234/influxdb
3. Use "Load Data" -> "Telegraf" -> "Create Configuration"
4. Select "Bucket" and "System", and give it a name
5. Urls generated for telegraf are not respecting basepath

__Expected behavior:__

I expect, that the generated urls to download the configuration and the url field in configuration respect the "basepath" parameter.
e.g.

```
telegraf --config https://10.52.126.234/influxdb/api/v2/telegrafs/1234567878
```

``` TOML
[[outputs.influxdb_v2]]
urls = ["https://10.52.126.234/influxdb"]
```

__Actual behavior:__

Generated urls ignore basepath configuration

```
telegraf --config https://10.52.126.234/api/v2/telegrafs/1234567878
```

``` TOML
[[outputs.influxdb_v2]]
urls = ["https://10.52.126.234"]
```

__Environment info:__

* System info: Run `uname -srm` and copy the output here
**Linux 4.15.0-124-generic x86_64**
* InfluxDB version: Run `influxd version` and copy the output here
**InfluxDB v2.0.4 (git: 4e7a59bb9a) build_date: 2021-03-15T07:37:28Z**
* Other relevant environment details: Container runtime, disk info, etc
**Running as snap**

__Config:__
Copy any non-default config values here or attach the full config as a gist or file.

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue through Load Data → Telegraf → Create Configuration with the application served under /influxdb. Compare the generated download URL and TOML urls value with the expected basepath-aware examples; done means both generated URLs include /influxdb.

Written by the indexing model from the issue text.

Assessment

Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.