Skip to content

Commit 9a12d15

Browse files
mergify[bot]natasha-moore-elasticgithub-actions[bot]
authored
[8.14] Adds Elastic Endpoint command reference (backport #5778) (#5802)
* Adds Elastic Endpoint command reference (#5778) * Adds Elastic Endpoint reference * Tweaks * Add to serverless docs * Adds command examples * Apply tech review feedback * Apply editorial feedback * Applies feedback (cherry picked from commit f548288) # Conflicts: # docs/serverless/serverless-security.docnav.json * Delete docs/serverless directory and its contents * Updates for 8.14 * Removes status example --------- Co-authored-by: natasha-moore-elastic <[email protected]> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent d3b31d8 commit 9a12d15

File tree

2 files changed

+304
-0
lines changed

2 files changed

+304
-0
lines changed
Lines changed: 303 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,303 @@
1+
[[endpoint-command-ref]]
2+
= {elastic-endpoint} command reference
3+
4+
This page lists the commands for management and troubleshooting of {elastic-endpoint}, the installed component that performs {elastic-defend}'s threat monitoring and prevention.
5+
6+
[NOTE]
7+
====
8+
* {elastic-endpoint} is not added to the `PATH` system variable, so you must prepend the commands with the full OS-dependent path:
9+
** On Windows: `"C:\Program Files\Elastic\Endpoint\elastic-endpoint.exe"`
10+
** On macOS: `/Library/Elastic/Endpoint/elastic-endpoint`
11+
** On Linux: `/opt/Elastic/Endpoint/elastic-endpoint`
12+
13+
* You must run the commands with elevated privileges—using `sudo` to run as the root user on Linux and macOS, or running as Administrator on Windows.
14+
====
15+
16+
The following {elastic-endpoint} commands are available:
17+
18+
* <<elastic-endpoint-diagnostics-command, diagnostics>>
19+
* <<elastic-endpoint-help-command, help>>
20+
* <<elastic-endpoint-install-command, install>>
21+
* <<elastic-endpoint-memorydump-command, memorydump>>
22+
* <<elastic-endpoint-run-command, run>>
23+
* <<elastic-endpoint-send-command, send>>
24+
* <<elastic-endpoint-test-command, test>>
25+
* <<elastic-endpoint-top-command, top>>
26+
* <<elastic-endpoint-uninstall-command, uninstall>>
27+
* <<elastic-endpoint-version-command, version>>
28+
29+
Each of the commands accepts the following logging options:
30+
31+
* `--log [stdout,stderr,debugview,file]`
32+
* `--log-level [error,info,debug]`
33+
34+
[discrete]
35+
[[elastic-endpoint-diagnostics-command]]
36+
== elastic-endpoint diagnostics
37+
38+
Gather diagnostics information from {elastic-endpoint}. This command produces an archive that contains:
39+
40+
- `version.txt`: Version information
41+
- `elastic-endpoint.yaml`: Current policy
42+
- `metrics.json`: Metrics document
43+
- `policy_response.json`: Last policy response
44+
- `system_info.txt`: System information
45+
- `analysis.txt`: Diagnostic analysis report
46+
- `logs` directory: Copy of {elastic-endpoint} log files
47+
48+
[discrete]
49+
=== Example
50+
51+
[source,shell]
52+
------
53+
elastic-endpoint diagnostics
54+
------
55+
56+
[discrete]
57+
[[elastic-endpoint-help-command]]
58+
== elastic-endpoint help
59+
60+
Show help for the available commands.
61+
62+
[discrete]
63+
=== Example
64+
65+
[source,shell]
66+
------
67+
elastic-endpoint help
68+
------
69+
70+
[discrete]
71+
[[elastic-endpoint-install-command]]
72+
== elastic-endpoint install
73+
74+
Install {elastic-endpoint} as a system service.
75+
76+
NOTE: We do not recommend installing {elastic-endpoint} using this command. {elastic-endpoint} is managed by {agent} and cannot function as a standalone service. Therefore, there is no separate installation package for {elastic-endpoint}, and it should not be installed independently.
77+
78+
[discrete]
79+
=== Options
80+
81+
`--resources <string>`::
82+
Specify a resources `.zip` file to be used during the installation. This option is required.
83+
84+
`--upgrade`::
85+
Upgrade the existing installation.
86+
87+
[discrete]
88+
=== Example
89+
90+
[source,shell]
91+
------
92+
elastic-endpoint install --upgrade --resources endpoint-security-resources.zip
93+
------
94+
95+
[discrete]
96+
[[elastic-endpoint-memorydump-command]]
97+
== elastic-endpoint memorydump
98+
99+
Save a memory dump of the {elastic-endpoint} service.
100+
101+
[discrete]
102+
=== Options
103+
104+
`--compress`::
105+
Compress the saved memory dump.
106+
107+
`--timeout <duration>`::
108+
Specify the memory collection timeout, in seconds; the default is 60 seconds.
109+
110+
[discrete]
111+
=== Example
112+
113+
[source,shell]
114+
------
115+
elastic-endpoint memorydump --timeout 120
116+
------
117+
118+
[discrete]
119+
[[elastic-endpoint-run-command]]
120+
== elastic-endpoint run
121+
122+
Run `elastic-endpoint` as a foreground process if no other instance is already running.
123+
124+
[discrete]
125+
=== Example
126+
127+
[source,shell]
128+
------
129+
elastic-endpoint run
130+
------
131+
132+
[discrete]
133+
[[elastic-endpoint-send-command]]
134+
== elastic-endpoint send
135+
136+
Send the requested document to the {stack}.
137+
138+
[discrete]
139+
=== Subcommands
140+
141+
`metadata`::
142+
Send an off-schedule metrics document to the {stack}.
143+
144+
[discrete]
145+
=== Example
146+
147+
[source,shell]
148+
------
149+
elastic-endpoint send metadata
150+
------
151+
152+
[discrete]
153+
[[elastic-endpoint-test-command]]
154+
== elastic-endpoint test
155+
156+
Perform the requested test.
157+
158+
[discrete]
159+
=== Subcommands
160+
161+
`output`::
162+
Test whether {elastic-endpoint} can connect to remote resources.
163+
164+
[discrete]
165+
=== Example
166+
167+
[source,shell]
168+
------
169+
elastic-endpoint test output
170+
------
171+
172+
[discrete]
173+
=== Example output
174+
175+
[source,txt]
176+
----
177+
Testing output connections using config file: [C:\Program Files\Elastic\Endpoint\elastic-endpoint.yaml]
178+
179+
Using proxy:
180+
181+
Elasticsearch server: https://example.elastic.co:443
182+
Status: Success
183+
184+
Global artifact server: https://artifacts.security.elastic.co
185+
Status: Success
186+
187+
Fleet server: https://fleet.example.elastic.co:443
188+
Status: Success
189+
----
190+
191+
[discrete]
192+
[[elastic-endpoint-top-command]]
193+
== elastic-endpoint top
194+
195+
Show a breakdown of the executables that triggered {elastic-endpoint} CPU usage within the last interval. This displays which {elastic-endpoint} features are resource-intensive for a particular executable.
196+
197+
NOTE: The meaning and output of this command are similar, but not identical, to the POSIX `top` command. The `elastic-endpoint top` command aggregates multiple processes by executable. The utilization values aren't measured by the OS scheduler but by a wall clock in user mode. The output helps identify outliers causing excessive CPU utilization, allowing you to fine-tune the {elastic-defend} policy and exception lists in your deployment.
198+
199+
[discrete]
200+
=== Options
201+
202+
`--interval <duration>`::
203+
Specify the data collection interval, in seconds; the default is 5 seconds.
204+
205+
`--limit <number>`::
206+
Specify the number of updates to collect; by default, data is collected until interrupted by **Ctrl+C**.
207+
208+
`--normalized`::
209+
Normalize CPU usage values to a total of 100% across all CPUs on multi-CPU systems.
210+
211+
[discrete]
212+
=== Example
213+
214+
[source,shell]
215+
------
216+
elastic-endpoint top --interval 10 --limit 5
217+
------
218+
219+
[discrete]
220+
=== Example output
221+
222+
[source,txt]
223+
----
224+
| PROCESS | OVERALL | API | BHVR | DIAG BHVR | DNS | FILE | LIB | MEM SCAN | MLWR | NET | PROC | RANSOM | REG |
225+
=============================================================================================================================================================
226+
| MSBuild.exe | 3146.0 | 0.0 | 0.8 | 0.7 | 0.0 | 2330.9 | 0.0 | 226.2 | 586.9 | 0.0 | 0.0 | 0.4 | 0.0 |
227+
| Microsoft.Management.Services.IntuneWindowsAgen... | 30.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.2 | 29.8 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
228+
| svchost.exe | 27.3 | 0.0 | 0.1 | 0.1 | 0.0 | 0.4 | 0.2 | 0.0 | 26.6 | 0.0 | 0.0 | 0.0 | 0.0 |
229+
| LenovoVantage-(LenovoServiceBridgeAddin).exe | 0.1 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.1 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
230+
| Lenovo.Modern.ImController.PluginHost.Device.exe | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
231+
| msedgewebview2.exe | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
232+
| msedge.exe | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
233+
| powershell.exe | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
234+
| WmiPrvSE.exe | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
235+
| Lenovo.Modern.ImController.PluginHost.Device.exe | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
236+
| Slack.exe | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
237+
| uhssvc.exe | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
238+
| explorer.exe | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
239+
| taskhostw.exe | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
240+
| Widgets.exe | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
241+
| elastic-endpoint.exe | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
242+
| sppsvc.exe | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
243+
244+
Endpoint service (16 CPU): 113.0% out of 1600%
245+
246+
Collecting data. Press Ctrl-C to cancel
247+
----
248+
249+
[discrete]
250+
==== Column abbreviations
251+
252+
* `API`: Event Tracing for Windows (ETW) API events
253+
* `AUTH`: Authentication events
254+
* `BHVR`: Malicious behavior protection
255+
* `CRED`: Credential access events
256+
* `DIAG BHVR`: Diagnostic malicious behavior protection
257+
* `DNS`: DNS events
258+
* `FILE`: File events
259+
* `LIB`: Library load events
260+
* `MEM SCAN`: Memory scanning
261+
* `MLWR`: Malware protection
262+
* `NET`: Network events
263+
* `PROC`: Process events
264+
* `PROC INJ`: Process injection
265+
* `RANSOM`: Ransomware protection
266+
* `REG`: Registry events
267+
268+
[discrete]
269+
[[elastic-endpoint-uninstall-command]]
270+
== elastic-endpoint uninstall
271+
272+
Uninstall {elastic-endpoint}.
273+
274+
NOTE: {elastic-endpoint} is managed by {agent}. To remove {elastic-endpoint} from the target machine permanently, remove the {elastic-defend} integration from the {fleet} policy. The <<uninstall-agent,elastic-agent uninstall>> command also uninstalls {elastic-endpoint}; therefore, in practice, the `elastic-endpoint uninstall` command is used only to troubleshoot broken installations.
275+
276+
[discrete]
277+
=== Options
278+
279+
`--uninstall-token <string>`::
280+
Provide the uninstall token. The token is required if <<agent-tamper-protection,agent tamper protection>> is enabled.
281+
282+
[discrete]
283+
=== Example
284+
285+
[source,shell]
286+
------
287+
elastic-endpoint uninstall --uninstall-token 12345678901234567890123456789012
288+
------
289+
290+
[discrete]
291+
[[elastic-endpoint-version-command]]
292+
== elastic-endpoint version
293+
294+
Show the version of {elastic-endpoint}.
295+
296+
[discrete]
297+
=== Example
298+
299+
[source,shell]
300+
------
301+
elastic-endpoint version
302+
------
303+

docs/management/manage-intro.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ include::{security-docs-root}/docs/management/admin/endpoint-artifacts.asciidoc[
1414
include::{security-docs-root}/docs/management/admin/endpoint-event-capture.asciidoc[leveloffset=+1]
1515
include::{security-docs-root}/docs/management/admin/allowlist-endpoint-3rd-party-av.asciidoc[leveloffset=+1]
1616
include::{security-docs-root}/docs/management/admin/endpoint-self-protection.asciidoc[leveloffset=+1]
17+
include::{security-docs-root}/docs/management/admin/endpoint-command-ref.asciidoc[leveloffset=+1]

0 commit comments

Comments
 (0)