From 0d6e885ba8b7b695644271ad134bbec8cfb88296 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 17 Dec 2024 11:43:42 +0000 Subject: [PATCH] [8.15] Document ways to provide multiple Agent uninstall tokens (backport #6300) (#6353) * Document ways to provide multiple Agent uninstall tokens (#6300) * Document ways to provide multiple Agent uninstall tokens * Apply suggestions from code review Co-authored-by: Benjamin Ironside Goldstein <91905639+benironside@users.noreply.github.com> --------- Co-authored-by: Benjamin Ironside Goldstein <91905639+benironside@users.noreply.github.com> (cherry picked from commit 87e3acb91306572e4077e375c6b0f45108ea2dd6) # Conflicts: # docs/getting-started/uninstall-agent.asciidoc # docs/serverless/edr-install-config/agent-tamper-protection.asciidoc # docs/serverless/edr-install-config/uninstall-agent.asciidoc * Delete docs/serverless directory and its contents * Resolves conflict --------- Co-authored-by: natasha-moore-elastic <137783811+natasha-moore-elastic@users.noreply.github.com> Co-authored-by: github-actions[bot] Co-authored-by: natasha-moore-elastic --- .../agent-tamper-protection.asciidoc | 2 ++ docs/getting-started/uninstall-agent.asciidoc | 30 +++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/docs/getting-started/agent-tamper-protection.asciidoc b/docs/getting-started/agent-tamper-protection.asciidoc index b60c453ed5..22afa0e653 100644 --- a/docs/getting-started/agent-tamper-protection.asciidoc +++ b/docs/getting-started/agent-tamper-protection.asciidoc @@ -47,3 +47,5 @@ If you need the uninstall token to remove {agent} from an endpoint, you can find ** Click the *Show token* icon in the *Token* column to reveal a specific token. ** Click the *View uninstall command* icon in the *Actions* column to open the *Uninstall agent* flyout, containing the full uninstall command with the token. + +TIP: If you have many tamper-protected {agent} policies, you may want to <> in a single command. \ No newline at end of file diff --git a/docs/getting-started/uninstall-agent.asciidoc b/docs/getting-started/uninstall-agent.asciidoc index 2a8cb7b79f..23001aee13 100644 --- a/docs/getting-started/uninstall-agent.asciidoc +++ b/docs/getting-started/uninstall-agent.asciidoc @@ -12,6 +12,36 @@ For example, to uninstall {agent} on a macOS or Linux host: sudo elastic-agent uninstall --uninstall-token 12345678901234567890123456789012 ---------------------------------- +[discrete] +[[multiple-uninstall-tokens]] +== Provide multiple uninstall tokens + +If you have multiple tamper-protected {agent} policies, you may want to provide multiple uninstall tokens in a single command. There are two ways to do this: + +* The `--uninstall-token` command can receive multiple uninstall tokens separated by a comma, without spaces. ++ +[source,shell] +---------------------------------- +sudo elastic-agent uninstall -f --uninstall-token 7b3d364db8e0deb1cda696ae85e42644,a7336b71e243e7c92d9504b04a774266 +---------------------------------- + +* `--uninstall-token`'s argument can also be a path to a text file with one uninstall token per line. ++ +NOTE: You must use the full file path, otherwise the file may not be found. ++ +[source,shell] +---------------------------------- +sudo elastic-agent uninstall -f --uninstall-token /tmp/tokens.txt +---------------------------------- ++ +In this example, `tokens.txt` would contain: ++ +[source,txt] +---------------------------------- +7b3d364db8e0deb1cda696ae85e42644 +a7336b71e243e7c92d9504b04a774266 +---------------------------------- + [discrete] [[uninstall-endpoint]] == Uninstall {elastic-endpoint}