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

promdump: make hostname handling more friendly #160

Open
ionthegeek opened this issue Dec 6, 2024 · 0 comments
Open

promdump: make hostname handling more friendly #160

ionthegeek opened this issue Dec 6, 2024 · 0 comments
Assignees

Comments

@ionthegeek
Copy link
Contributor

ionthegeek commented Dec 6, 2024

Currently promdump uses separate flags to specify the YBA hostname (--yba_hostname / ‑‑yba_api_hostname) and the Prometheus URL (--url), both of which default to localhost.

When using YBA API mode on any system where TLS is configured, one or both of these flags will always have to be changed (or we have to skip host verification) because the hostname localhost should never match the hostname(s) on the certificates.

The flags used to specify connection information should be simplified to avoid having to specify the hostname in two different flags if it is the same (and it almost always will be).

Ideas:

  1. Add a --hostname flag that can be used to set both the YBA hostname and the Prometheus hostname at the same time. Deprecate the --url flag and add --prometheus_hostname, --prometheus_port, --prometheus_username, --prometheus_password, --prometheus_use_tls, etc. to replace the --url flag. Each flag would have to have two variants, one for Prometheus and one for the YBA API. Some of these already exist for the YBA API.
  2. Instead of using localhost as the default hostname, use os.Hostname() to get it. If we expect to need the fully qualified domain name (e.g. because the certificates don't list the short names of nodes), that will require more work as there's no trivial way to do this in Golang.
  3. If --url is specified but --yba_hostname isn't, use the hostname from the --url flag.

Will need to think through which of the above would make for the best user experience (and we can always implement more than one).

@ionthegeek ionthegeek self-assigned this Dec 6, 2024
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