influxdata / whisper-migrator

A tool for migrating data from Graphite Whisper files to InfluxDB TSM files (version 0.10.0).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CreateShards: only default Addr setting in the client.NewHTTPClient initialization

nitr0dv opened this issue · comments

You have such initialization of the client.NewHTTPClient object

func (migrationData *MigrationData) CreateShards() error {
  c, _ := client.NewHTTPClient(client.HTTPConfig{
  Addr: "http://localhost:8086",
})

I think that you need to rewrite it like this to use command line settings for the host and port if they were defined

func (migrationData *MigrationData) CreateShards() error {
  c, _ := client.NewHTTPClient(client.HTTPConfig{
  Addr: migrationData.host + ":" + migrationData.port,
})

Thanks for reporting this
#11