VictoriaMetrics / vmctl

Victoria Metrics command line tool
36 stars 8 forks source link

vm-project-id is not implemented for cluster version #26

Closed fabcasa closed 4 years ago

fabcasa commented 4 years ago

In case of using multitenancy with accountid and projectid in the cluster version, we are not able to use vmctl to import historical data from an external prometheus to a tenant (accountid:projectid) on our vmdb cluster.

But, according to the vmctl doc, and the tests we have done, it seems that vmctl does not support accountid:projectid values for the flag -vm-account-id and the flag -vm-project-id does not exist

A workaound proposed in the general slack was to specify import url with flag: --vm-addr=vmhostname:port_number/insert/0:1/prometheus and omit flag --vm-account-id Unfortunately it is not helpful. As soon as we specify vm-addr, the vmctl try to send an health status to the url provided, so vmhostname:port_number/insert/0:1/prometheus/health generate an error 400.

Is-it possible to add an option in vmctl as --vm-project-id ? Or a successful workaround :)

hagen1778 commented 4 years ago

Hi @fabcasa! Thanks for report! See linked PR https://github.com/VictoriaMetrics/vmctl/pull/27 You may verify changes yourself by building from sources. See how to make a build here - https://github.com/VictoriaMetrics/vmctl#how-to-build Once PR is merged I'll cut a release.

fabcasa commented 4 years ago

Hi @hagen1778, Thanks for corrections. Now, the vmctl with option --vm-account-id=accountid:projectid is working as expected. I do not have the result yet beacuse my import from prometheus is still in progess, but I'm quiet confident in a successful importation.

Again, many thanks for your quick fix, and for improving the wonderful VictoriaMetrics.

hagen1778 commented 4 years ago

Thanks! Since you're migrating Prometheus data you might find interesting the articles listed here https://github.com/VictoriaMetrics/vmctl#articles

fabcasa commented 4 years ago

Yep that's perfect! Great Perfs! Have a look to the import rate into our cluster ;)

Import_Prom

hagen1778 commented 4 years ago

The fix was published in a new release https://github.com/VictoriaMetrics/vmctl/releases/tag/0.2.0