grafana/k6

URL parsing of --out influxdb= not optimal

已关闭

#425 创建于 2017年12月18日

 (6 条评论) (0 个反应) (1 位负责人)Go (1,537 个派生)batch import
bugenhancementhelp wantedtriage

仓库指标

星标
 (30,564 个星标)
PR 合并指标
 (平均合并 11天 15小时) (30 天内合并 47 个 PR)

描述

First off, thanks for a great piece of awesome-sauce. So far I love working with k6!

Now to what is causing me some headache. I have several InfluxDBs hosted behind a reverse proxy that uses paths to send traffic to the correct InfluxDB instance. However, the behaviour of --out influxdb only allows me to specify the hostname, and not the sub-path of the InfluxDB instance. k6 automatically interprets the path-portion of the URL to be the InfluxDB database. So using https://my.site.io/influxdbA/k6db results in k6 trying to connect to InfluxDB hosted on my.site.io and using database influxdbA/k6db. Instead of my intended behaviour of connecting to https://my.site.io/influxdbA/ and use database k6db.

Here is a few suggestions:

  • Only the last portion of the URL should be interpreted as the database name. Will be a problem if people are using database names with /, even though I'm not sure if that is allowed in InfluxDB.
  • Specify the database as an argument, like site.io/influxA?db=k6db.
  • Specify the database as a separate argument from the InfluxDB URL itself.

贡献者指南