crowdsec icon indicating copy to clipboard operation
crowdsec copied to clipboard

[wip] add `cscli support dump`

Open blotus opened this issue 3 years ago • 2 comments

This PR add support command to cscli.

The only subcommand available for now is dump. It will create a zip file containing various details about the crowdsec installation and the OS to help diagnose users issues more efficiently.

This collects:

  • [x] Crowdsec version
  • [x] OS version
  • [x] Installed collections list
  • [x] Installed parsers list
  • [x] Installed scenarios list
  • [x] Installed postoverflows list
  • [x] Bouncers list
  • [x] Machines list
  • [x] CAPI status
  • [x] LAPI status
  • [ ] Crowdsec config (sensitive information like username and password are redacted)
  • [x] Crowdsec metrics

blotus avatar Jul 03 '22 17:07 blotus

Codecov Report

Merging #1634 (6694275) into master (27194a9) will increase coverage by 4.71%. The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1634      +/-   ##
==========================================
+ Coverage   53.35%   58.07%   +4.71%     
==========================================
  Files         136      104      -32     
  Lines       18980    12577    -6403     
==========================================
- Hits        10127     7304    -2823     
+ Misses       7732     4537    -3195     
+ Partials     1121      736     -385     
Flag Coverage Δ
func-crowdsec ?
func-cscli ?
unit-linux 64.17% <ø> (ø)
unit-windows 53.55% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/acquisition/modules/journalctl/journalctl.go 71.73% <0.00%> (-2.72%) :arrow_down:
cmd/crowdsec-cli/bouncers.go
cmd/crowdsec-cli/collections.go
cmd/crowdsec-cli/hub.go
cmd/crowdsec-cli/machines.go
cmd/crowdsec-cli/main.go
cmd/crowdsec-cli/metrics.go
cmd/crowdsec-cli/parsers.go
cmd/crowdsec-cli/postoverflows.go
cmd/crowdsec-cli/scenarios.go
... and 24 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov-commenter avatar Jul 03 '22 17:07 codecov-commenter

Is it possible to avoid calling log.Fatal and just return errors, to check coverage? thanks

mmetc avatar Jul 04 '22 07:07 mmetc