grafana/k6

URL parsing of --out influxdb= not optimal

オープン

#425 opened on 2017/12/18

 (6 件のコメント) (0 件のリアクション) (1 人の担当者)Go (1,537 件のフォーク)batch import
bugenhancementhelp wantedtriage

Repository metrics

Stars
 (30,564 個のスター)
PR merge metrics
 (平均マージ 11d 15h) (30d で 47 merged PRs)

説明

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.

コントリビューターガイド