Skip to content

Commit 6ab826e

Browse files
authored
Updated CLI examples to long-form arguments for ease of reading (#28)
1 parent 01d62d3 commit 6ab826e

File tree

1 file changed

+32
-5
lines changed

1 file changed

+32
-5
lines changed

docs/etoe_reference_example.md

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,16 @@ Take a look at an example of how you can use some of our DaC features. The repo
6868
}
6969
```
7070

71-
1. Export custom rules and related exceptions to a Kibana Instance, overwriting existing, stripping version, and skipping errors.
71+
1. Export custom rules and related exceptions from a Kibana Instance, overwriting existing, stripping version, and skipping errors.
7272

73-
`python -m detection_rules kibana export-rules -s -sv -e -ac -d <desired_path>`
73+
```
74+
python -m detection_rules kibana export-rules \
75+
--skip-errors \
76+
--strip-version \
77+
--export-exceptions \
78+
--export-action-connectors \
79+
--directory my-custom-rules
80+
```
7481

7582
1. Run local unit tests.
7683

@@ -80,15 +87,35 @@ Take a look at an example of how you can use some of our DaC features. The repo
8087

8188
💡 Note: Please remember to backup your rules! If you have not run `kibana export-rules` or used the UI to perform a bulk export of rules before running this command, please do so! Once rules are overwritten in Elastic Security/Kibana it may be impossible to recover them! See the [FAQ](./faq.md#q8-how-can-i-backup-my-rules-prior-to-overwriting-rules-in-kibana) for more info on backing up rules.
8289

83-
`python -m detection_rules kibana import-rules --overwrite -e -ac`
90+
```bash
91+
python -m detection_rules kibana import-rules \
92+
--overwrite \
93+
--overwrite-exceptions \
94+
--overwrite-action-connectors
95+
```
8496

8597
1. Or if you prefer to import and export using ndjson file(s) instead of the Kibana API use the following:
8698

8799
For moving rules from a Kibana rules export to the repo
88-
`python -m detection_rules import-rules-to-repo <ndjson_file> --required-only -e -da DefaultAuthor -ske -ac`
100+
101+
```bash
102+
python -m detection_rules import-rules-to-repo <ndjson_file> \
103+
--required-only \
104+
--action-connector-import \
105+
--exceptions-import \
106+
--default-author DefaultAuthor \
107+
--skip-errors
108+
```
89109

90110
For moving rules from the repo to an ndjson file that is compatible with Kibana rule import.
91-
` python -m detection_rules export-rules-from-repo -ac -e`
111+
112+
```bash
113+
python -m detection_rules export-rules-from-repo \
114+
--directory my-custom-rules \
115+
--outfile my-custom-rules-export.ndjson \
116+
--include-action-connectors \
117+
--include-exceptions
118+
```
92119

93120
For more information on these CLI commands please see CLI.md, docs-dev/custom-rules.md, and docs-dev/detections-as-code.md in [Detection Rules](https://github.com/elastic/detection-rules).
94121

0 commit comments

Comments
 (0)