From d0c62a42a5c50c917e1b3bae218eeda4f598ab10 Mon Sep 17 00:00:00 2001 From: marco Date: Wed, 7 Aug 2024 10:27:00 +0200 Subject: [PATCH 1/3] update cscli docs for 1.6.3 --- crowdsec-docs/docs/cscli/cscli_bouncers.md | 1 + .../docs/cscli/cscli_bouncers_delete.md | 9 +++- .../docs/cscli/cscli_bouncers_inspect.md | 41 ++++++++++++++++++ crowdsec-docs/docs/cscli/cscli_hub_update.md | 3 +- .../docs/cscli/cscli_lapi_context.md | 4 -- .../docs/cscli/cscli_lapi_register.md | 1 + crowdsec-docs/docs/cscli/cscli_machines.md | 1 + .../docs/cscli/cscli_machines_delete.md | 3 +- .../docs/cscli/cscli_machines_inspect.md | 42 +++++++++++++++++++ .../docs/cscli/cscli_notifications.md | 4 +- .../docs/cscli/cscli_notifications_inspect.md | 4 +- .../docs/cscli/cscli_notifications_list.md | 4 +- .../docs/cscli/cscli_notifications_test.md | 2 +- .../docs/cscli/cscli_support_dump.md | 17 ++++---- 14 files changed, 112 insertions(+), 24 deletions(-) create mode 100644 crowdsec-docs/docs/cscli/cscli_bouncers_inspect.md create mode 100644 crowdsec-docs/docs/cscli/cscli_machines_inspect.md diff --git a/crowdsec-docs/docs/cscli/cscli_bouncers.md b/crowdsec-docs/docs/cscli/cscli_bouncers.md index a2dc2e133..469eb79f1 100644 --- a/crowdsec-docs/docs/cscli/cscli_bouncers.md +++ b/crowdsec-docs/docs/cscli/cscli_bouncers.md @@ -36,6 +36,7 @@ Note: This command requires database direct access, so is intended to be run on * [cscli](/cscli/cscli.md) - cscli allows you to manage crowdsec * [cscli bouncers add](/cscli/cscli_bouncers_add.md) - add a single bouncer to the database * [cscli bouncers delete](/cscli/cscli_bouncers_delete.md) - delete bouncer(s) from the database +* [cscli bouncers inspect](/cscli/cscli_bouncers_inspect.md) - inspect a bouncer by name * [cscli bouncers list](/cscli/cscli_bouncers_list.md) - list all bouncers within the database * [cscli bouncers prune](/cscli/cscli_bouncers_prune.md) - prune multiple bouncers from the database diff --git a/crowdsec-docs/docs/cscli/cscli_bouncers_delete.md b/crowdsec-docs/docs/cscli/cscli_bouncers_delete.md index 9c719154f..76c644183 100644 --- a/crowdsec-docs/docs/cscli/cscli_bouncers_delete.md +++ b/crowdsec-docs/docs/cscli/cscli_bouncers_delete.md @@ -10,10 +10,17 @@ delete bouncer(s) from the database cscli bouncers delete MyBouncerName [flags] ``` +### Examples + +``` +cscli bouncers delete "bouncer1" "bouncer2" +``` + ### Options ``` - -h, --help help for delete + -h, --help help for delete + --ignore-missing don't print errors if one or more bouncers don't exist ``` ### Options inherited from parent commands diff --git a/crowdsec-docs/docs/cscli/cscli_bouncers_inspect.md b/crowdsec-docs/docs/cscli/cscli_bouncers_inspect.md new file mode 100644 index 000000000..d7e6aad90 --- /dev/null +++ b/crowdsec-docs/docs/cscli/cscli_bouncers_inspect.md @@ -0,0 +1,41 @@ +--- +id: cscli_bouncers_inspect +title: cscli bouncers inspect +--- +## cscli bouncers inspect + +inspect a bouncer by name + +``` +cscli bouncers inspect [bouncer_name] [flags] +``` + +### Examples + +``` +cscli bouncers inspect "bouncer1" +``` + +### Options + +``` + -h, --help help for inspect +``` + +### Options inherited from parent commands + +``` + --color string Output color: yes, no, auto (default "auto") + -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml") + --debug Set logging to debug + --error Set logging to error + --info Set logging to info + -o, --output string Output format: human, json, raw + --trace Set logging to trace + --warning Set logging to warning +``` + +### SEE ALSO + +* [cscli bouncers](/cscli/cscli_bouncers.md) - Manage bouncers [requires local API] + diff --git a/crowdsec-docs/docs/cscli/cscli_hub_update.md b/crowdsec-docs/docs/cscli/cscli_hub_update.md index c6e041f03..e988cd1c8 100644 --- a/crowdsec-docs/docs/cscli/cscli_hub_update.md +++ b/crowdsec-docs/docs/cscli/cscli_hub_update.md @@ -19,7 +19,8 @@ cscli hub update [flags] ### Options ``` - -h, --help help for update + -h, --help help for update + --with-content Download index with embedded item content ``` ### Options inherited from parent commands diff --git a/crowdsec-docs/docs/cscli/cscli_lapi_context.md b/crowdsec-docs/docs/cscli/cscli_lapi_context.md index a7f4014f8..ea92cf338 100644 --- a/crowdsec-docs/docs/cscli/cscli_lapi_context.md +++ b/crowdsec-docs/docs/cscli/cscli_lapi_context.md @@ -6,10 +6,6 @@ title: cscli lapi context Manage context to send with alerts -``` -cscli lapi context [command] [flags] -``` - ### Options ``` diff --git a/crowdsec-docs/docs/cscli/cscli_lapi_register.md b/crowdsec-docs/docs/cscli/cscli_lapi_register.md index 378973f18..59abdd3e8 100644 --- a/crowdsec-docs/docs/cscli/cscli_lapi_register.md +++ b/crowdsec-docs/docs/cscli/cscli_lapi_register.md @@ -21,6 +21,7 @@ cscli lapi register [flags] -f, --file string output file destination -h, --help help for register --machine string Name of the machine to register with + --token string Auto registration token to use -u, --url string URL of the API (ie. http://127.0.0.1) ``` diff --git a/crowdsec-docs/docs/cscli/cscli_machines.md b/crowdsec-docs/docs/cscli/cscli_machines.md index 6cfca6212..9f2e71c4b 100644 --- a/crowdsec-docs/docs/cscli/cscli_machines.md +++ b/crowdsec-docs/docs/cscli/cscli_machines.md @@ -42,6 +42,7 @@ cscli machines [action] * [cscli](/cscli/cscli.md) - cscli allows you to manage crowdsec * [cscli machines add](/cscli/cscli_machines_add.md) - add a single machine to the database * [cscli machines delete](/cscli/cscli_machines_delete.md) - delete machine(s) by name +* [cscli machines inspect](/cscli/cscli_machines_inspect.md) - inspect a machine by name * [cscli machines list](/cscli/cscli_machines_list.md) - list all machines in the database * [cscli machines prune](/cscli/cscli_machines_prune.md) - prune multiple machines from the database * [cscli machines validate](/cscli/cscli_machines_validate.md) - validate a machine to access the local API diff --git a/crowdsec-docs/docs/cscli/cscli_machines_delete.md b/crowdsec-docs/docs/cscli/cscli_machines_delete.md index b8b6eda20..4f7060daf 100644 --- a/crowdsec-docs/docs/cscli/cscli_machines_delete.md +++ b/crowdsec-docs/docs/cscli/cscli_machines_delete.md @@ -19,7 +19,8 @@ cscli machines delete "machine1" "machine2" ### Options ``` - -h, --help help for delete + -h, --help help for delete + --ignore-missing don't print errors if one or more machines don't exist ``` ### Options inherited from parent commands diff --git a/crowdsec-docs/docs/cscli/cscli_machines_inspect.md b/crowdsec-docs/docs/cscli/cscli_machines_inspect.md new file mode 100644 index 000000000..d3e556f3a --- /dev/null +++ b/crowdsec-docs/docs/cscli/cscli_machines_inspect.md @@ -0,0 +1,42 @@ +--- +id: cscli_machines_inspect +title: cscli machines inspect +--- +## cscli machines inspect + +inspect a machine by name + +``` +cscli machines inspect [machine_name] [flags] +``` + +### Examples + +``` +cscli machines inspect "machine1" +``` + +### Options + +``` + -h, --help help for inspect + -H, --hub show hub state +``` + +### Options inherited from parent commands + +``` + --color string Output color: yes, no, auto (default "auto") + -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml") + --debug Set logging to debug + --error Set logging to error + --info Set logging to info + -o, --output string Output format: human, json, raw + --trace Set logging to trace + --warning Set logging to warning +``` + +### SEE ALSO + +* [cscli machines](/cscli/cscli_machines.md) - Manage local API machines [requires local API] + diff --git a/crowdsec-docs/docs/cscli/cscli_notifications.md b/crowdsec-docs/docs/cscli/cscli_notifications.md index da8fe06aa..7c90f0a55 100644 --- a/crowdsec-docs/docs/cscli/cscli_notifications.md +++ b/crowdsec-docs/docs/cscli/cscli_notifications.md @@ -32,8 +32,8 @@ To list/inspect/test notification template ### SEE ALSO * [cscli](/cscli/cscli.md) - cscli allows you to manage crowdsec -* [cscli notifications inspect](/cscli/cscli_notifications_inspect.md) - Inspect active notifications plugin configuration -* [cscli notifications list](/cscli/cscli_notifications_list.md) - list active notifications plugins +* [cscli notifications inspect](/cscli/cscli_notifications_inspect.md) - Inspect notifications plugin +* [cscli notifications list](/cscli/cscli_notifications_list.md) - list notifications plugins * [cscli notifications reinject](/cscli/cscli_notifications_reinject.md) - reinject an alert into profiles to trigger notifications * [cscli notifications test](/cscli/cscli_notifications_test.md) - send a generic test alert to notification plugin diff --git a/crowdsec-docs/docs/cscli/cscli_notifications_inspect.md b/crowdsec-docs/docs/cscli/cscli_notifications_inspect.md index 9efb5a89b..32461c641 100644 --- a/crowdsec-docs/docs/cscli/cscli_notifications_inspect.md +++ b/crowdsec-docs/docs/cscli/cscli_notifications_inspect.md @@ -4,11 +4,11 @@ title: cscli notifications inspect --- ## cscli notifications inspect -Inspect active notifications plugin configuration +Inspect notifications plugin ### Synopsis -Inspect active notifications plugin and show configuration +Inspect notifications plugin and show configuration ``` cscli notifications inspect [flags] diff --git a/crowdsec-docs/docs/cscli/cscli_notifications_list.md b/crowdsec-docs/docs/cscli/cscli_notifications_list.md index 763a256f5..198fa3d20 100644 --- a/crowdsec-docs/docs/cscli/cscli_notifications_list.md +++ b/crowdsec-docs/docs/cscli/cscli_notifications_list.md @@ -4,11 +4,11 @@ title: cscli notifications list --- ## cscli notifications list -list active notifications plugins +list notifications plugins ### Synopsis -list active notifications plugins +list notifications plugins and their status (active or not) ``` cscli notifications list [flags] diff --git a/crowdsec-docs/docs/cscli/cscli_notifications_test.md b/crowdsec-docs/docs/cscli/cscli_notifications_test.md index b08e27b24..b9c30e0cd 100644 --- a/crowdsec-docs/docs/cscli/cscli_notifications_test.md +++ b/crowdsec-docs/docs/cscli/cscli_notifications_test.md @@ -8,7 +8,7 @@ send a generic test alert to notification plugin ### Synopsis -send a generic test alert to a notification plugin to test configuration even if is not active +send a generic test alert to a notification plugin even if it is not active in profiles ``` cscli notifications test [plugin name] [flags] diff --git a/crowdsec-docs/docs/cscli/cscli_support_dump.md b/crowdsec-docs/docs/cscli/cscli_support_dump.md index fd44f7313..6148f9f5b 100644 --- a/crowdsec-docs/docs/cscli/cscli_support_dump.md +++ b/crowdsec-docs/docs/cscli/cscli_support_dump.md @@ -8,20 +8,17 @@ Dump all your configuration to a zip file for easier support ### Synopsis -Dump the following informations: +Dump the following information: - Crowdsec version - OS version -- Installed collections list -- Installed parsers list -- Installed scenarios list -- Installed postoverflows list -- Installed context list -- Bouncers list -- Machines list -- CAPI status -- LAPI status +- Enabled feature flags +- Latest Crowdsec logs (log processor, LAPI, remediation components) +- Installed collections, parsers, scenarios... +- Bouncers and machines list +- CAPI/LAPI status - Crowdsec config (sensitive information like username and password are redacted) - Crowdsec metrics +- Stack trace in case of process crash ``` cscli support dump [flags] From a34d84de58e037df65beddb94d6a2cf36ca6325d Mon Sep 17 00:00:00 2001 From: Laurence Jones Date: Thu, 19 Sep 2024 10:43:29 +0100 Subject: [PATCH 2/3] Add bouncers inspect to sidebar --- crowdsec-docs/sidebars.js | 1 + 1 file changed, 1 insertion(+) diff --git a/crowdsec-docs/sidebars.js b/crowdsec-docs/sidebars.js index d6dc0249e..dc0986691 100644 --- a/crowdsec-docs/sidebars.js +++ b/crowdsec-docs/sidebars.js @@ -412,6 +412,7 @@ items: [ "cscli/cscli_bouncers_add", "cscli/cscli_bouncers_delete", + "cscli/cscli_bouncers_inspect", "cscli/cscli_bouncers_list", "cscli/cscli_bouncers_prune", ], From 811793a366a9d331e12747d98017661d06f92712 Mon Sep 17 00:00:00 2001 From: Laurence Jones Date: Thu, 19 Sep 2024 10:44:40 +0100 Subject: [PATCH 3/3] add machines inspect to sidebar --- crowdsec-docs/sidebars.js | 1 + 1 file changed, 1 insertion(+) diff --git a/crowdsec-docs/sidebars.js b/crowdsec-docs/sidebars.js index dc0986691..75ec1c76e 100644 --- a/crowdsec-docs/sidebars.js +++ b/crowdsec-docs/sidebars.js @@ -564,6 +564,7 @@ items: [ "cscli/cscli_machines_add", "cscli/cscli_machines_delete", + "cscli/cscli_machines_inspect", "cscli/cscli_machines_list", "cscli/cscli_machines_prune", "cscli/cscli_machines_validate",