|
| 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-inspect-command, inspect>> |
| 21 | +* <<elastic-endpoint-install-command, install>> |
| 22 | +* <<elastic-endpoint-memorydump-command, memorydump>> |
| 23 | +* <<elastic-endpoint-run-command, run>> |
| 24 | +* <<elastic-endpoint-send-command, send>> |
| 25 | +* <<elastic-endpoint-status-command, status>> |
| 26 | +* <<elastic-endpoint-test-command, test>> |
| 27 | +* <<elastic-endpoint-top-command, top>> |
| 28 | +* <<elastic-endpoint-uninstall-command, uninstall>> |
| 29 | +* <<elastic-endpoint-version-command, version>> |
| 30 | + |
| 31 | +Each of the commands accepts the following logging options: |
| 32 | + |
| 33 | +* `--log [stdout,stderr,debugview,file]` |
| 34 | +* `--log-level [error,info,debug]` |
| 35 | + |
| 36 | +[discrete] |
| 37 | +[[elastic-endpoint-diagnostics-command]] |
| 38 | +== elastic-endpoint diagnostics |
| 39 | + |
| 40 | +Gather diagnostics information from {elastic-endpoint}. This command produces an archive that contains: |
| 41 | + |
| 42 | +- `version.txt`: Version information |
| 43 | +- `elastic-endpoint.yaml`: Current policy |
| 44 | +- `metrics.json`: Metrics document |
| 45 | +- `policy_response.json`: Last policy response |
| 46 | +- `system_info.txt`: System information |
| 47 | +- `analysis.txt`: Diagnostic analysis report |
| 48 | +- `logs` directory: Copy of {elastic-endpoint} log files |
| 49 | + |
| 50 | +[discrete] |
| 51 | +=== Example |
| 52 | + |
| 53 | +[source,shell] |
| 54 | +------ |
| 55 | +elastic-endpoint diagnostics |
| 56 | +------ |
| 57 | + |
| 58 | +[discrete] |
| 59 | +[[elastic-endpoint-help-command]] |
| 60 | +== elastic-endpoint help |
| 61 | + |
| 62 | +Show help for the available commands. |
| 63 | + |
| 64 | +[discrete] |
| 65 | +=== Example |
| 66 | + |
| 67 | +[source,shell] |
| 68 | +------ |
| 69 | +elastic-endpoint help |
| 70 | +------ |
| 71 | + |
| 72 | +[discrete] |
| 73 | +[[elastic-endpoint-inspect-command]] |
| 74 | +== elastic-endpoint inspect |
| 75 | + |
| 76 | +Show the current {elastic-endpoint} configuration. |
| 77 | + |
| 78 | +[discrete] |
| 79 | +=== Example |
| 80 | + |
| 81 | +[source,shell] |
| 82 | +------ |
| 83 | +elastic-endpoint inspect |
| 84 | +------ |
| 85 | + |
| 86 | +[discrete] |
| 87 | +[[elastic-endpoint-install-command]] |
| 88 | +== elastic-endpoint install |
| 89 | + |
| 90 | +Install {elastic-endpoint} as a system service. |
| 91 | + |
| 92 | +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. |
| 93 | + |
| 94 | +[discrete] |
| 95 | +=== Options |
| 96 | + |
| 97 | +`--resources <string>`:: |
| 98 | +Specify a resources `.zip` file to be used during the installation. This option is required. |
| 99 | + |
| 100 | +`--upgrade`:: |
| 101 | +Upgrade the existing installation. |
| 102 | + |
| 103 | +[discrete] |
| 104 | +=== Example |
| 105 | + |
| 106 | +[source,shell] |
| 107 | +------ |
| 108 | +elastic-endpoint install --upgrade --resources endpoint-security-resources.zip |
| 109 | +------ |
| 110 | + |
| 111 | +[discrete] |
| 112 | +[[elastic-endpoint-memorydump-command]] |
| 113 | +== elastic-endpoint memorydump |
| 114 | + |
| 115 | +Save a memory dump of the {elastic-endpoint} service. |
| 116 | + |
| 117 | +[discrete] |
| 118 | +=== Options |
| 119 | + |
| 120 | +`--compress`:: |
| 121 | +Compress the saved memory dump. |
| 122 | + |
| 123 | +`--timeout <duration>`:: |
| 124 | +Specify the memory collection timeout, in seconds; the default is 60 seconds. |
| 125 | + |
| 126 | +[discrete] |
| 127 | +=== Example |
| 128 | + |
| 129 | +[source,shell] |
| 130 | +------ |
| 131 | +elastic-endpoint memorydump --timeout 120 |
| 132 | +------ |
| 133 | + |
| 134 | +[discrete] |
| 135 | +[[elastic-endpoint-run-command]] |
| 136 | +== elastic-endpoint run |
| 137 | + |
| 138 | +Run `elastic-endpoint` as a foreground process if no other instance is already running. |
| 139 | + |
| 140 | +[discrete] |
| 141 | +=== Example |
| 142 | + |
| 143 | +[source,shell] |
| 144 | +------ |
| 145 | +elastic-endpoint run |
| 146 | +------ |
| 147 | + |
| 148 | +[discrete] |
| 149 | +[[elastic-endpoint-send-command]] |
| 150 | +== elastic-endpoint send |
| 151 | + |
| 152 | +Send the requested document to the {stack}. |
| 153 | + |
| 154 | +[discrete] |
| 155 | +=== Subcommands |
| 156 | + |
| 157 | +`metadata`:: |
| 158 | +Send an off-schedule metrics document to the {stack}. |
| 159 | + |
| 160 | +[discrete] |
| 161 | +=== Example |
| 162 | + |
| 163 | +[source,shell] |
| 164 | +------ |
| 165 | +elastic-endpoint send metadata |
| 166 | +------ |
| 167 | + |
| 168 | +[discrete] |
| 169 | +[[elastic-endpoint-status-command]] |
| 170 | +== elastic-endpoint status |
| 171 | + |
| 172 | +Retrieve the current status of the running {elastic-endpoint} service. The command also returns the last known status of {agent}. |
| 173 | + |
| 174 | +[discrete] |
| 175 | +=== Options |
| 176 | + |
| 177 | +`--output`:: |
| 178 | +Control the level of detail and formatting of the information. Valid values are: |
| 179 | + |
| 180 | +* `human`: Returns limited information when {elastic-endpoint}'s status is `Healthy`. If any policy actions weren't successfully applied, the relevant details are displayed. |
| 181 | +* `full`: Always returns the full status information. |
| 182 | +* `json`: Always returns the full status information. |
| 183 | + |
| 184 | +[discrete] |
| 185 | +=== Example |
| 186 | + |
| 187 | +[source,shell] |
| 188 | +------ |
| 189 | +elastic-endpoint status --output json |
| 190 | +------ |
| 191 | + |
| 192 | +[discrete] |
| 193 | +[[elastic-endpoint-test-command]] |
| 194 | +== elastic-endpoint test |
| 195 | + |
| 196 | +Perform the requested test. |
| 197 | + |
| 198 | +[discrete] |
| 199 | +=== Subcommands |
| 200 | + |
| 201 | +`output`:: |
| 202 | +Test whether {elastic-endpoint} can connect to remote resources. |
| 203 | + |
| 204 | +[discrete] |
| 205 | +=== Example |
| 206 | + |
| 207 | +[source,shell] |
| 208 | +------ |
| 209 | +elastic-endpoint test output |
| 210 | +------ |
| 211 | + |
| 212 | +[discrete] |
| 213 | +=== Example output |
| 214 | + |
| 215 | +[source,txt] |
| 216 | +---- |
| 217 | +Testing output connections |
| 218 | +
|
| 219 | +Using proxy: |
| 220 | +
|
| 221 | +Elasticsearch server: https://example.elastic.co:443 |
| 222 | + Status: Success |
| 223 | +
|
| 224 | +Global artifact server: https://artifacts.security.elastic.co |
| 225 | + Status: Success |
| 226 | +
|
| 227 | +Fleet server: https://fleet.example.elastic.co:443 |
| 228 | + Status: Success |
| 229 | +---- |
| 230 | + |
| 231 | +[discrete] |
| 232 | +[[elastic-endpoint-top-command]] |
| 233 | +== elastic-endpoint top |
| 234 | + |
| 235 | +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. |
| 236 | + |
| 237 | +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. |
| 238 | + |
| 239 | +[discrete] |
| 240 | +=== Options |
| 241 | + |
| 242 | +`--interval <duration>`:: |
| 243 | +Specify the data collection interval, in seconds; the default is 5 seconds. |
| 244 | + |
| 245 | +`--limit <number>`:: |
| 246 | +Specify the number of updates to collect; by default, data is collected until interrupted by **Ctrl+C**. |
| 247 | + |
| 248 | +`--normalized`:: |
| 249 | +Normalize CPU usage values to a total of 100% across all CPUs on multi-CPU systems. |
| 250 | + |
| 251 | +[discrete] |
| 252 | +=== Example |
| 253 | + |
| 254 | +[source,shell] |
| 255 | +------ |
| 256 | +elastic-endpoint top --interval 10 --limit 5 |
| 257 | +------ |
| 258 | + |
| 259 | +[discrete] |
| 260 | +=== Example output |
| 261 | + |
| 262 | +[source,txt] |
| 263 | +---- |
| 264 | +| PROCESS | OVERALL | API | BHVR | DIAG BHVR | DNS | FILE | LIB | MEM SCAN | MLWR | NET | PROC | RANSOM | REG | |
| 265 | +============================================================================================================================================================= |
| 266 | +| 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 | |
| 267 | +| 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 | |
| 268 | +| 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 | |
| 269 | +| 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 | |
| 270 | +| 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 | |
| 271 | +| 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 | |
| 272 | +| 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 | |
| 273 | +| 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 | |
| 274 | +| 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 | |
| 275 | +| 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 | |
| 276 | +| 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 | |
| 277 | +| 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 | |
| 278 | +| 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 | |
| 279 | +| 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 | |
| 280 | +| 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 | |
| 281 | +| 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 | |
| 282 | +| 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 | |
| 283 | +
|
| 284 | +Endpoint service (16 CPU): 113.0% out of 1600% |
| 285 | +
|
| 286 | +Collecting data. Press Ctrl-C to cancel |
| 287 | +---- |
| 288 | + |
| 289 | +[discrete] |
| 290 | +==== Column abbreviations |
| 291 | + |
| 292 | +* `API`: Event Tracing for Windows (ETW) API events |
| 293 | +* `AUTH`: Authentication events |
| 294 | +* `BHVR`: Malicious behavior protection |
| 295 | +* `CRED`: Credential access events |
| 296 | +* `DIAG BHVR`: Diagnostic malicious behavior protection |
| 297 | +* `DNS`: DNS events |
| 298 | +* `FILE`: File events |
| 299 | +* `LIB`: Library load events |
| 300 | +* `MEM SCAN`: Memory scanning |
| 301 | +* `MLWR`: Malware protection |
| 302 | +* `NET`: Network events |
| 303 | +* `PROC`: Process events |
| 304 | +* `PROC INJ`: Process injection |
| 305 | +* `RANSOM`: Ransomware protection |
| 306 | +* `REG`: Registry events |
| 307 | + |
| 308 | +[discrete] |
| 309 | +[[elastic-endpoint-uninstall-command]] |
| 310 | +== elastic-endpoint uninstall |
| 311 | + |
| 312 | +Uninstall {elastic-endpoint}. |
| 313 | + |
| 314 | +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. |
| 315 | + |
| 316 | +[discrete] |
| 317 | +=== Options |
| 318 | + |
| 319 | +`--uninstall-token <string>`:: |
| 320 | +Provide the uninstall token. The token is required if <<agent-tamper-protection,agent tamper protection>> is enabled. |
| 321 | + |
| 322 | +[discrete] |
| 323 | +=== Example |
| 324 | + |
| 325 | +[source,shell] |
| 326 | +------ |
| 327 | +elastic-endpoint uninstall --uninstall-token 12345678901234567890123456789012 |
| 328 | +------ |
| 329 | + |
| 330 | +[discrete] |
| 331 | +[[elastic-endpoint-version-command]] |
| 332 | +== elastic-endpoint version |
| 333 | + |
| 334 | +Show the version of {elastic-endpoint}. |
| 335 | + |
| 336 | +[discrete] |
| 337 | +=== Example |
| 338 | + |
| 339 | +[source,shell] |
| 340 | +------ |
| 341 | +elastic-endpoint version |
| 342 | +------ |
| 343 | + |
0 commit comments