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

Add troubleshooting for agent that can't be unenrolled #903

Merged
merged 3 commits into from
Feb 8, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a missing double quote on "<agent-id2>"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for catching that @criamico! It's fixed.

"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