Skip to content

Commit

Permalink
Add troubleshooting for agent that can't be unenrolled (elastic#903) (e…
Browse files Browse the repository at this point in the history
…lastic#905)

* Add troubleshooting for agent that can't be uninstalled

* change title

* Add missing quotation mark

(cherry picked from commit fe54e95)

Co-authored-by: David Kilfoyle <[email protected]>
  • Loading branch information
mergify[bot] and kilfoyle authored Feb 8, 2024
1 parent daaed72 commit e0399d6
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions docs/en/ingest-management/troubleshooting/troubleshooting.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Running {agent} standalone? Also refer to <<debug-standalone-agents>>.

Find troubleshooting information for {fleet}, {fleet-server}, and {agent} in the following documentation:

* <<deleted-policy-unenroll>>
* <<tsdb-illegal-argument>>
* <<agents-in-cloud-stuck-at-updating>>
* <<fleet-server-not-in-kibana-cloud>>
Expand Down Expand Up @@ -59,6 +60,41 @@ Find troubleshooting information for {fleet}, {fleet-server}, and {agent} in the
* <<fleet-server-integration-removed>>
* <<agent-oom-k8s>>




[discrete]
[[deleted-policy-unenroll]]
== {agent} unenroll fails

In {fleet}, if you delete an {agent} policy that is associated with one or more inactive enrolled agents, when the agent returns back to a `Healthy` or `Offline` state, it cannot be unenrolled. Attempting to unenroll the agent results in an `Error unenrolling agent` message, and the unenrollment fails.

To resolve this problem, you can use the <<fleet-api-docs,{kib} {fleet} APIs>> to force unenroll the agent.

To uninstall a single {agent}:

[source,"shell"]
----
POST kbn:/api/fleet/agents/<agent_id>/unenroll
{
"force": true,
"revoke": true
}
----

To bulk uninstall a set of {agents}:

[source,"shell"]
----
POST kbn:/api/fleet/agents/bulk_unenroll
{ "agents": ["<agent_id1>", "<agent-id2>"],
"force": true,
"revoke": true
}
----

We are also updating the {fleet} UI to prevent removal of an {agent} policy that is currently associated with any inactive agents.

[discrete]
[[tsdb-illegal-argument]]
== illegal_argument_exception when TSDB is enabled
Expand Down

0 comments on commit e0399d6

Please sign in to comment.