Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
marshallmain committed Mar 13, 2020
1 parent 692c362 commit 84940c7
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions x-pack/plugins/endpoint/scripts/README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
This script makes it easy to create the endpoint metadata, alert, and event documents needed to test Resolver in Kibana.
The default behavior is to create 1 endpoint with 1 alert and a moderate number of events (random, typically on the order of 20).
The default behavior is to create 1 endpoint with 1 alert and a moderate number of events (random, typically on the order of 20). **THE EVENT AND METADATA INDICES WILL BE DELETED AND REMADE BEFORE INSERTING.**
A seed value can be provided as a string for the random number generator for repeatable behavior, useful for demos etc.

The sample data generator script depends on ts-node, install with npm:
`npm install -g ts-node`

```npm install -g ts-node```

Example command sequence to get ES and kibana running with sample data after installing ts-node:
`yarn es snapshot` -> starts ES
`npx yarn start --xpack.endpoint.enabled=true --no-base-path` -> starts kibana
`cd ~/path/to/kibana/x-pack/plugins/endpoint`
`yarn test:generate --auth elastic:changeme`

```yarn es snapshot``` -> starts ES

```npx yarn start --xpack.endpoint.enabled=true --no-base-path``` -> starts kibana

```cd ~/path/to/kibana/x-pack/plugins/endpoint```

```yarn test:generate --auth elastic:changeme``` -> run the resolver_generator.ts script

Resolver generator CLI options:
--help Show help [boolean]
```--help Show help [boolean]
--seed, -s random seed to use for document generator [string]
--node, -n elasticsearch node url
[string] [default: "http://localhost:9200"]
Expand All @@ -36,4 +42,4 @@ Resolver generator CLI options:
--numEndpoints, --ne number of different endpoints to generate alerts
for [number] [default: 1]
--alertsPerEndpoint, --ape number of resolver trees to make for each endpoint
[number] [default: 1]
[number] [default: 1]```

0 comments on commit 84940c7

Please sign in to comment.