-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Support CLI flag shortcuts for Cloud configuration #4959
Comments
@tsg is it |
I see beats uses dots in long options, ignore my comment :) |
A small change of plans, after discussing things in our team meeting, we decided to have a way to specify the Playing with possible implementations, most reasonable is to have
|
This adds two new configuration settings: `cloud.id` and `cloud.auth`. They can be used in the configuration file, or from the CLI like this: ``` ./metricbeat -e -E cloud.id=<cloud-id> -E cloud.auth=<cloud-auth> ``` The ES/KB settings are changed via overwritting, but we display an INFO level message that the settings are changed by the cloud-id. Closes elastic#4959.
* Added cloud.id and cloud.auth config settings This adds two new configuration settings: `cloud.id` and `cloud.auth`. They can be used in the configuration file, or from the CLI like this: ``` ./metricbeat -e -E cloud.id=<cloud-id> -E cloud.auth=<cloud-auth> ``` The ES/KB settings are changed via overwritting, but we display an INFO level message that the settings are changed by the cloud-id. Closes #4959. * goimports fix * aded more tests * added basic docs * changelog * addressed comments * Check that we're not enabling a second output * remove unused var * Addressed comments
* Added cloud.id and cloud.auth config settings This adds two new configuration settings: `cloud.id` and `cloud.auth`. They can be used in the configuration file, or from the CLI like this: ``` ./metricbeat -e -E cloud.id=<cloud-id> -E cloud.auth=<cloud-auth> ``` The ES/KB settings are changed via overwritting, but we display an INFO level message that the settings are changed by the cloud-id. Closes elastic#4959. * goimports fix * aded more tests * added basic docs * changelog * addressed comments * Check that we're not enabling a second output * remove unused var * Addressed comments (cherry picked from commit bd6981d)
This adds two new configuration settings: `cloud.id` and `cloud.auth`. They can be used in the configuration file, or from the CLI like this: ``` ./metricbeat -e -E cloud.id=<cloud-id> -E cloud.auth=<cloud-auth> ``` The ES/KB settings are changed via overwritting, but we display an INFO level message that the settings are changed by the cloud-id. Closes #4959. * goimports fix * aded more tests * added basic docs * changelog * addressed comments * Check that we're not enabling a second output * remove unused var * Addressed comments (cherry picked from commit bd6981d)
…#4976) This adds two new configuration settings: `cloud.id` and `cloud.auth`. They can be used in the configuration file, or from the CLI like this: ``` ./metricbeat -e -E cloud.id=<cloud-id> -E cloud.auth=<cloud-auth> ``` The ES/KB settings are changed via overwritting, but we display an INFO level message that the settings are changed by the cloud-id. Closes elastic#4959. * goimports fix * aded more tests * added basic docs * changelog * addressed comments * Check that we're not enabling a second output * remove unused var * Addressed comments (cherry picked from commit 3d32342)
To simplify the usage of Beats with Elastic Cloud, this proposes the addition of two new CLI flags:
These options are CLI only, but they overwrite settings in the configuration file.
Starting with
cloud.auth
because it's simpler, the username and password are used to overwriteoutput.elasticsearch.username
andoutput.elasticsearch.password
. Using the new flag is equivalent with doing-E output.elasticsearch.username=<user> -E output.elasticsearch.password=<pass>
, but shorter.The cloud-id, to be passed to the
cloud.id
setting, looks something like this:staging:dXMtZWFzdC0xLmF3cy5mb3VuZC5pbyRjZWM2ZjI2MWE3NGJmMjRjZTMzYmI4ODExYjg0Mjk0ZiRjNmMyY2E2ZDA0MjI0OWFmMGNjN2Q3YTllOTYyNTc0Mw==
This can be decomposed using the following algorithm:
Everything up to the first
:
is ignored. This is an optional user friendly token that can be used to more easily identify the cloud ID. If no:
is present, then the IS is passed as is to the next step.The rest of the ID is base64 decoded:
us-east-1.aws.found.io$cec6f261a74bf24ce33bb8811b84294f$c6c2ca6d042249af0cc7d7a9e9625743
There are three parts, separated by
$
, in order:host:
us-east-1.aws.found.io
es-id:
cec6f261a74bf24ce33bb8811b84294f
kibana-id:
c6c2ca6d042249af0cc7d7a9e9625743
The
es-id
andkibana-id
are parsed as URLs, andhost
is appended to their host parts. Thehttps
scheme and port443
are added:es-url:
https://cec6f261a74bf24ce33bb8811b84294f.us-east-1.aws.found.io:443
kibana-url:
https://c6c2ca6d042249af0cc7d7a9e9625743.us-east-1.aws.found.io:443
The resulting
es-url
andkibana-url
are used to overwrite the settingsoutput.elasticsearch.hosts
andsetup.kibana.hosts
.TODOs:
The text was updated successfully, but these errors were encountered: