Skip to content

Commit 8dc39fc

Browse files
committed
missing scripts + change url
1 parent 821a23a commit 8dc39fc

File tree

9 files changed

+5320
-3
lines changed

9 files changed

+5320
-3
lines changed

x-pack/plugins/siem/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"cypress:open": "cypress open --config-file ./cypress/cypress.json",
1111
"cypress:run": "cypress run --browser chrome --headless --spec ./cypress/integration/**/*.spec.ts --config-file ./cypress/cypress.json --reporter ../../node_modules/cypress-multi-reporters --reporter-options configFile=./cypress/reporter_config.json; status=$?; ../../node_modules/.bin/mochawesome-merge --reportDir ../../../target/kibana-siem/cypress/results > ../../../target/kibana-siem/cypress/results/output.json; ../../../node_modules/.bin/marge ../../../target/kibana-siem/cypress/results/output.json --reportDir ../../../target/kibana-siem/cypress/results; mkdir -p ../../../target/junit && cp ../../../target/kibana-siem/cypress/results/*.xml ../../../target/junit/ && exit $status;",
1212
"cypress:run-as-ci": "node ../../../scripts/functional_tests --config ../../test/siem_cypress/config.ts",
13-
"test:generate": "ts-node --project scripts/cli_tsconfig.json scripts/resolver_generator.ts"
13+
"test:generate": "ts-node --project scripts/endpoint/cli_tsconfig.json scripts/endpoint/resolver_generator.ts"
1414
},
1515
"devDependencies": {
1616
"@types/lodash": "^4.14.110"

x-pack/plugins/siem/public/endpoint_alerts/store/selectors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const alertListPagination = createStructuredSelector({
4343
* Returns a boolean based on whether or not the user is on the alerts page
4444
*/
4545
export const isOnAlertPage = (state: Immutable<AlertListState>): boolean => {
46-
return state.location ? state.location.pathname === '/alerts' : false;
46+
return state.location ? state.location.pathname === '/endpoint-alerts' : false;
4747
};
4848

4949
/**

x-pack/plugins/siem/public/endpoint_hosts/store/selectors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export const policyResponseLoading = (state: Immutable<HostState>): boolean =>
9595
export const policyResponseError = (state: Immutable<HostState>) => state.policyResponseError;
9696

9797
export const isOnHostPage = (state: Immutable<HostState>) =>
98-
state.location ? state.location.pathname === '/hosts' : false;
98+
state.location ? state.location.pathname === '/endpoint-hosts' : false;
9999

100100
export const uiQueryParams: (
101101
state: Immutable<HostState>
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
This script makes it easy to create the endpoint metadata, alert, and event documents needed to test Resolver in Kibana.
2+
The default behavior is to create 1 endpoint with 1 alert and a moderate number of events (random, typically on the order of 20).
3+
A seed value can be provided as a string for the random number generator for repeatable behavior, useful for demos etc.
4+
Use the `-d` option if you want to delete and remake the indices, otherwise it will add documents to existing indices.
5+
6+
The sample data generator script depends on ts-node, install with npm:
7+
8+
```npm install -g ts-node```
9+
10+
Example command sequence to get ES and kibana running with sample data after installing ts-node:
11+
12+
```yarn es snapshot``` -> starts ES
13+
14+
```npx yarn start --xpack.endpoint.enabled=true --no-base-path``` -> starts kibana
15+
16+
```cd ~/path/to/kibana/x-pack/plugins/endpoint```
17+
18+
```yarn test:generate --auth elastic:changeme``` -> run the resolver_generator.ts script
19+
20+
Resolver generator CLI options:
21+
```--help Show help [boolean]
22+
--seed, -s random seed to use for document generator [string]
23+
--node, -n elasticsearch node url
24+
[string] [default: "http://localhost:9200"]
25+
--eventIndex, --ei index to store events in
26+
[string] [default: "events-endpoint-1"]
27+
--metadataIndex, --mi index to store endpoint metadata in
28+
[string] [default: "endpoint-agent-1"]
29+
--auth elasticsearch username and password, separated by
30+
a colon [string]
31+
--ancestors, --anc number of ancestors of origin to create
32+
[number] [default: 3]
33+
--generations, --gen number of child generations to create
34+
[number] [default: 3]
35+
--children, --ch maximum number of children per node
36+
[number] [default: 3]
37+
--relatedEvents, --related number of related events to create for each
38+
process event [number] [default: 5]
39+
--percentWithRelated, --pr percent of process events to add related events to
40+
[number] [default: 30]
41+
--percentTerminated, --pt percent of process events to add termination event
42+
for [number] [default: 30]
43+
--numEndpoints, --ne number of different endpoints to generate alerts
44+
for [number] [default: 1]
45+
--alertsPerEndpoint, --ape number of resolver trees to make for each endpoint
46+
[number] [default: 1]```

0 commit comments

Comments
 (0)