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

[Elastic-Agent] Remove flag --non-interactive from the enroll documentation #1668

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

herrBez
Copy link
Contributor

@herrBez herrBez commented Feb 5, 2025

Problem

The documentation page https://www.elastic.co/guide/en/fleet/current/elastic-agent-cmd-options.html erroneously reports that the flag --non-interactive can be used with the the elastic-agent enroll command.

This is not the case. If we execute enroll with this flag, we receive the following error:

unknown flag: --non-interactive

This is also confirmed by the execution of elastic-agent enroll --help:

COMMAND OUTPUT
MYSHELL$ ./elastic-agent enroll --help
This command will enroll the Elastic Agent into Fleet.

Usage:
  elastic-agent enroll [flags]

Flags:
  -p, --ca-sha256 string                                Comma-separated list of certificate authority hash pins for server verification used by Elastic Agent and Fleet Server
  -a, --certificate-authorities string                  Comma-separated list of root certificates for server verification used by Elastic Agent and Fleet Server
      --daemon-timeout duration                         Timeout waiting for Elastic Agent daemon
      --delay-enroll                                    Delays enrollment to occur on first start of the Elastic Agent service
      --elastic-agent-cert string                       Elastic Agent client certificate to use with Fleet Server during mTLS authentication
      --elastic-agent-cert-key string                   Elastic Agent client private key to use with Fleet Server during mTLS authentication
      --elastic-agent-cert-key-passphrase string        Path for private key passphrase file used to decrypt Elastic Agent client certificate key
  -t, --enrollment-token string                         Enrollment token to use to enroll Agent into Fleet
      --fleet-server-cert string                        Certificate for Fleet Server to use for exposed HTTPS endpoint
      --fleet-server-cert-key string                    Private key for the certificate used by Fleet Server for exposed HTTPS endpoint
      --fleet-server-cert-key-passphrase string         Path for private key passphrase file used to decrypt Fleet Server certificate key
      --fleet-server-client-auth string                 Fleet Server mTLS client authentication for connecting Elastic Agents. Must be one of [none, optional, required] (default "none")
      --fleet-server-es string                          Start and run a Fleet Server alongside this Elastic Agent connecting to the provided Elasticsearch
      --fleet-server-es-ca string                       Path to certificate authority for Fleet Server to use to communicate with Elasticsearch
      --fleet-server-es-ca-trusted-fingerprint string   Elasticsearch certificate authority's SHA256 fingerprint for Fleet Server to use
      --fleet-server-es-cert string                     Client certificate for Fleet Server to use when connecting to Elasticsearch
      --fleet-server-es-cert-key string                 Client private key for Fleet Server to use when connecting to Elasticsearch
      --fleet-server-es-insecure                        Disables validation of Elasticsearch certificates for Fleet Server
      --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 for Fleet Server to use for communication with Elasticsearch
      --fleet-server-service-token-path string          Filepath for the service token secret file used by Fleet Server for communication with Elasticsearch
      --fleet-server-timeout duration                   When bootstrapping Fleet Server, 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 by Fleet Server when communicating with Elasticsearch
  -h, --help                                            help for enroll
  -i, --insecure                                        Allow insecure connection made by the Elastic Agent. It's also required to use a Fleet Server on a HTTP endpoint
      --proxy-disabled                                  Disable proxy support including environment variables: when bootstrapping Fleet Server, it's the proxy used by Fleet Server to connect to Elasticsearch; when enrolling the Elastic Agent to Fleet Server, it's the proxy used by the Elastic Agent to connect to Fleet Server
      --proxy-header strings                            Proxy headers used with CONNECT request: when bootstrapping Fleet Server, it's the proxy used by Fleet Server to connect to Elasticsearch; when enrolling the Elastic Agent to Fleet Server, it's the proxy used by the Elastic Agent to connect to Fleet Server
      --proxy-url string                                Configures the proxy URL: when bootstrapping Fleet Server, it's the proxy used by Fleet Server to connect to Elasticsearch; when enrolling the Elastic Agent to Fleet Server, it's the proxy used by the Elastic Agent to connect to Fleet Server
      --staging string                                  Configures Elastic Agent to download artifacts from a staging build
      --tag strings                                     User-set tags
      --url string                                      URL to enroll Agent into Fleet

Global Flags:
  -c, --c string                     Configuration file, relative to path.config (default "elastic-agent.yml")
      --config string                Configuration file, relative to path.config (default "elastic-agent.yml")
  -d, --d string                     Enable certain debug selectors
  -e, --e                            Log to stderr and disable syslog/file output
      --environment environmentVar   set environment being ran in (default default)
      --path.config string           Config path is the directory Agent looks for its config file (default "/home/mirko/elastic-agent-8.17.1-linux-x86_64")
      --path.downloads string        Downloads path contains binaries Agent downloads (default "/home/mirko/elastic-agent-8.17.1-linux-x86_64/data/elastic-agent-b46c28/downloads")
      --path.home string             Agent root path (default "/home/mirko/elastic-agent-8.17.1-linux-x86_64")
      --path.install string          DEPRECATED, setting this flag has no effect since v8.6.0
      --path.logs string             Logs path contains Agent log output (default "/home/mirko/elastic-agent-8.17.1-linux-x86_64")
      --path.socket string           Control protocol socket path for the Agent (default "unix:///home/mirko/elastic-agent-8.17.1-linux-x86_64/elastic-agent.sock")
  -v, --v                            Log at INFO level

Fix

In this PR I remove the --non-interactive flag from the elastic-agent enroll command documentation.

Related Issues/PR

Remove the `--non-interactive` flag from the `elastic-agent enroll` command because its not available
@herrBez herrBez requested a review from kilfoyle February 5, 2025 14:39
@herrBez herrBez requested a review from a team as a code owner February 5, 2025 14:39
Copy link

github-actions bot commented Feb 5, 2025

It looks like this PR modifies one or more .asciidoc files. These files are being migrated to Markdown, and any changes merged now will be lost. See the migration guide for details.

Copy link

github-actions bot commented Feb 5, 2025

A documentation preview will be available soon.

Request a new doc build by commenting
  • Rebuild this PR: run docs-build
  • Rebuild this PR and all Elastic docs: run docs-build rebuild

run docs-build is much faster than run docs-build rebuild. A rebuild should only be needed in rare situations.

If your PR continues to fail for an unknown reason, the doc build pipeline may be broken. Elastic employees can check the pipeline status here.

Copy link
Contributor

mergify bot commented Feb 5, 2025

This pull request does not have a backport label. Could you fix it @herrBez? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-/d./d is the label to automatically backport to the /d./d branch. /d is the digit
    NOTE: backport-skip has been added to this pull request.

@kilfoyle
Copy link
Contributor

kilfoyle commented Feb 5, 2025

Hi @herrBez, Thanks for opening this. The documentation is currently frozen while we migrate to a new system. The freeze will end on February 20. After that, changes would need to be made in the 9.0 docs system and/or the 8.x docs system depending on where the update should go. Sorry for the inconvenience.

@herrBez
Copy link
Contributor Author

herrBez commented Feb 5, 2025

Thank you for the quick feedback. I will add a reminder in my calendar to control the issue and apply the correct labels ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants