Skip to content

Commit

Permalink
[docs] Add topic about stopping Elastic Agent (#19971) (#20164)
Browse files Browse the repository at this point in the history
* Add topic about stopping Elastic Agent

* Add systemctl stop command

* Add kill command

* Add missing colon
  • Loading branch information
dedemorton committed Jul 22, 2020
1 parent 77ceb47 commit 80fcb07
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
2 changes: 2 additions & 0 deletions x-pack/elastic-agent/docs/elastic-agent.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ include::install-elastic-agent.asciidoc[leveloffset=+1]

include::run-elastic-agent.asciidoc[leveloffset=+1]

include::stop-elastic-agent.asciidoc[leveloffset=+1]

include::elastic-agent-command-line.asciidoc[leveloffset=+1]

include::elastic-agent-configuration.asciidoc[leveloffset=+1]
Expand Down
43 changes: 43 additions & 0 deletions x-pack/elastic-agent/docs/stop-elastic-agent.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
[[stop-elastic-agent]]
[role="xpack"]
= Stop {agent}

To stop {agent} and its related executables, stop the {agent} process. Use the
commands that work for your system.

//TODO: Replace with tabbed panel when it's out of experimental phase.

*Windows:*

If you installed the Agent as a service, stop the service. If
necessary, use Task Manager on Windows to stop {agent}. This will kill the
{agent} process and any sub-processes it created (such as {beats}).

*Linux or macOS:*

Run the following command to get the ID of the `elastic-agent` process:

[source,shell]
----
ps | grep elastic-agent
----

Then kill the process:

[source,shell]
----
kill -9 PID
----

Where `PID` is the ID of the `elastic-agent` process.

*Systemd:*

The DEB and RPM packages include a service unit for Linux systems with systemd.
On these systems, you can manage {agent} by using systemd commands. Use
`systemctl` to stop the Agent:

[source,shell]
----
systemctl stop elastic-agent
----

0 comments on commit 80fcb07

Please sign in to comment.