VictoriaMetrics / vmctl

Victoria Metrics command line tool
36 stars 8 forks source link

Problems with victoria-metrics-prod -httpAuth.username -httpAuth.password #3

Closed morozovsk closed 4 years ago

morozovsk commented 4 years ago

vmctl doesn't have login/password for vm http auth. For example: --vm-user value --vm-password value

failed to create VM importer: ping to "http://localhost:8428" failed: bad status code: 401

But there is an undocumented feature : --vm-addr http://telegraf:telegraf@localhost:8428

hagen1778 commented 4 years ago

Hi @morozovsk! Pls see commit https://github.com/VictoriaMetrics/vmctl/commit/dfda71a4858db6cb80828187532b74524c7c16f1 for basic auth params support. It is already in master

morozovsk commented 4 years ago

Doesn't work: --vm-user telegraf --vm-password telegraf

Works: --vm-addr http://telegraf:telegraf@localhost:8428 --vm-user telegraf --vm-password telegraf --vm-addr http://telegraf:telegraf@localhost:8428 --vm-user telegraf --vm-password 123456 --vm-addr http://telegraf:telegraf@localhost:8428

failed to create VM importer: ping to "http://localhost:8428" failed: bad status code: 401

hagen1778 commented 4 years ago

Yeah, my bad - forgot to authorize Ping requests. Pls check following commit https://github.com/VictoriaMetrics/vmctl/commit/73157b05e663ee19fc883e4997e3beca7f0e7510