elastic / ingest-docs

Elastic Ingest Documentation
Other
5 stars 60 forks source link

[REQUEST]: Elastic Agent CLI options/flsgs need to be updated #290

Closed nimarezainia closed 8 months ago

nimarezainia commented 1 year ago

Description

What we have in the docs here.

Doesn't reflect the current agent capabilities (particularly the proxy ones that are important): [the same applies to the enroll command]

sudo ./elastic-agent install -h This will install Elastic Agent permanently on this system and will become managed by the systems service manager.

Unless all the require command-line parameters are provided or -f is used this command will ask questions on how you would like the Agent to operate.

Usage: elastic-agent install [flags]

Flags: -p, --ca-sha256 string Comma separated list of certificate authorities hash pins used for certificate verifications -a, --certificate-authorities string Comma separated list of root certificate for server verifications --daemon-timeout duration Timeout waiting for Elastic Agent daemon --delay-enroll Delays enrollment to occur on first start of the Elastic Agent service -t, --enrollment-token string Enrollment token to use to enroll Agent into Fleet --fleet-server-cert string Certificate to use for exposed Fleet Server HTTPS endpoint --fleet-server-cert-key string Private key to use for exposed Fleet Server HTTPS endpoint --fleet-server-es string Start and run a Fleet Server along side this Elastic Agent connecting to the provided elasticsearch --fleet-server-es-ca string Path to certificate authority to use with communicate with elasticsearch --fleet-server-es-ca-trusted-fingerprint string Elasticsearch certificate authority's SHA256 fingerprint --fleet-server-es-insecure Disables validation of certificates --fleet-server-host string Fleet Server HTTP binding host (overrides the policy) --fleet-server-insecure-http Expose Fleet Server over HTTP (not recommended; insecure) --fleet-server-policy string Start and run a Fleet Server on this specific policy --fleet-server-port uint16 Fleet Server HTTP binding port (overrides the policy) --fleet-server-service-token string Service token to use for communication with elasticsearch --fleet-server-timeout duration Timeout waiting for Fleet Server to be ready to start enrollment -f, --force Force overwrite the current and do not prompt for confirmation --header strings Headers used in communication with elasticsearch -h, --help help for install -i, --insecure Allow insecure connection to fleet-server -n, --non-interactive Install Elastic Agent in non-interactive mode which will not prompt on missing parameters but fails instead. --proxy-disabled Disable proxy support including environment variables --proxy-header strings Proxy headers used with CONNECT request --proxy-url string Configures the proxy url --staging string Configures agent to download artifacts from a staging build --tag strings User set tags --url string URL to enroll Agent into Fleet

Resources

the best resource would be the command line itself

Collaboration

The documentation team will investigate the issue and create the initial content.

Point of contact.

Main contact: @nimarezainia

Stakeholders: @joshdover @michel

dedemorton commented 1 year ago

@nimarezainia Do you know which versions are impacted?

Also we need to make sure developers understand it's their responsibility to update the published docs when they add or change the CLI. Otherwise the info is going to get out of sync. (I still think it's worth showing the commands in the docs so the info is discoverable through a google search, but it's not so good if the info is stale.)

sakurai-youhei commented 11 months ago

Hi @dedemorton FYI, here is one example.

Confirmed version: 8.10.4

https://github.com/elastic/ingest-docs/blob/ff0df50062ac5ddff2c210a3640d2c37b33a880d/docs/en/ingest-management/commands.asciidoc?plain=1#L140-L150

https://github.com/elastic/ingest-docs/blob/ff0df50062ac5ddff2c210a3640d2c37b33a880d/docs/en/ingest-management/commands.asciidoc?plain=1#L159-L180

List of non-global flags from enroll:

$ elastic-agent help enroll | grep -B100 'Global Flags:' | cut -c7- | grep -e '^--' | awk '{print $1}'
--ca-sha256
--certificate-authorities
--daemon-timeout
--delay-enroll
--enrollment-token
--fleet-server-cert
--fleet-server-cert-key
--fleet-server-cert-key-passphrase
--fleet-server-es
--fleet-server-es-ca
--fleet-server-es-ca-trusted-fingerprint
--fleet-server-es-insecure
--fleet-server-host
--fleet-server-insecure-http
--fleet-server-policy
--fleet-server-port
--fleet-server-service-token
--fleet-server-service-token-path
--fleet-server-timeout
--force
--header
--help
--insecure
--proxy-disabled
--proxy-header
--proxy-url
--staging
--tag
--url

Non-global flags not listed in the doc:

Note: --proxy-disabled was added in https://github.com/elastic/beats/pull/26514, but I don't find a corresponding doc update.

dedemorton commented 11 months ago

cc @ingest-docs as I'm no longer working on this project.

dedemorton commented 11 months ago

cc @kilfoyle (I don't think my previous cc worked).