VictoriaMetrics / vmctl

Victoria Metrics command line tool
36 stars 8 forks source link

InfluxDB 2 support #32

Open jonppe opened 3 years ago

jonppe commented 3 years ago

InfluxDB 2 has been out for a while and I think vmctl does not properly support that. The result I'm seeing is:

InfluxDB import mode
2021/01/01 10:02:49 failed to create influx client: ping failed: <!doctype html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>InfluxDB 2.0</title><base href="/"><link rel="shortcut icon" href="/favicon.ico"></head><body><div id="react-root" data-basepath=""></div><script src="/5e93c5f5aa.js"></script></body></html>

Very briefly looking at the codebase, I suppose vmctl would need to use the new version of the official influxdb client or bring in the changes some other way.

Alternatively, it would be good to mention that >2.0 is not supported.

If anyone else faces the same issue maybe this Python script is good enough alternative https://github.com/jonppe/influx_to_victoriametrics

hagen1778 commented 3 years ago

Hi @jonppe! Thanks for the issue and your own implementation for this! I'm not familiar with influxdb and everything which happens to it. Migration from v1 was implemented just by reading the docs and trying things for the first time. I wasn't aware there is a v2. Thanks for pointing this out!

I briefly looked at v2 and new go client. This all seems like a totally new piece of software to me and may take additional time to investigate. So far I'll just outline that vmctl does not support influxdb v2.x and will recommend your solution instead- pls see https://github.com/VictoriaMetrics/vmctl/commit/2d9542737f7210d807aa98e25be9a7068abe54a3

Once again thank you for the issue and alternative implementation. I guess, I'll use it as reference when working on v2 support.

valyala commented 3 years ago

FYI, vmctl has been migrated to main VictoriaMetrics repository. New releases for vmctl will be available at vmutils-*.tar.gz package on the releases page starting from v1.53.0 . It is recommended filing new issues and feature requests for vmctl in main VictoriaMetrics repository.