grafana/k6

URL parsing of --out influxdb= not optimal

Open

#425 aperta il 18 dic 2017

Vedi su GitHub
 (6 commenti) (0 reazioni) (1 assegnatario)Go (1537 fork)batch import
bugenhancementhelp wantedtriage

Metriche repository

Star
 (30.564 star)
Metriche merge PR
 (Merge medio 11g 15h) (47 PR mergiate in 30 g)

Descrizione

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.

Guida contributor