Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve --help output #17

Open
simonswine opened this issue Aug 7, 2020 · 0 comments
Open

Improve --help output #17

simonswine opened this issue Aug 7, 2020 · 0 comments

Comments

@simonswine
Copy link
Collaborator

Currently the CLI is providing a somewhat confusing help output:

      --pulsar.url=""            The URL of the remote Pulsar server to send samples to. Example: pulsar://pulsar-proxy:6650 or pulsar+ssl://pulsar-proxy:6651. None, if empty.

But if you actually supply it with quotes it doesn't work:

$ ./prometheus-pulsar-remote-write-linux-amd64 '--pulsar.url="pulsar+ssl://pulsar-proxy:6651"'
level=error ts=2020-08-07T07:52:12.640Z caller=main.go:265 msg="Failed to initialize Pulsar" err="Invalid service URL: InvalidConfiguration"

$ ./prometheus-pulsar-remote-write-linux-amd64 --pulsar.url '"pulsar+ssl://pulsar-proxy:6651"'
ERRO[0000] Failed to parse service URL                   error="parse \"\\\"pulsar+ssl://pulsar-proxy:6651\\\"\": first path segment in URL cannot contain colon"

What works is:

$ ./prometheus-pulsar-remote-write-linux-amd64 --pulsar.url="pulsar+ssl://pulsar-proxy:6651"
level=info ts=2020-08-07T07:52:18.509Z caller=main.go:307 msg="Starting up..."

$ ./prometheus-pulsar-remote-write-linux-amd64 '--pulsar.url=pulsar+ssl://pulsar-proxy:6651'
level=info ts=2020-08-07T07:52:29.481Z caller=main.go:307 msg="Starting up..."

$ ./prometheus-pulsar-remote-write-linux-amd64 --pulsar.url "pulsar+ssl://pulsar-proxy:6651"
level=info ts=2020-08-07T07:55:20.306Z caller=main.go:307 msg="Starting up..."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant