Skip to content

ihcsim/sbsearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sbsearch

sbsearch is a Harvester support bundle tool that search for keywords in the resource logs and displayed them in chronological order. It uses the grep crate for fast searching and the ratatui crate for terminal user interface.

screenshot of the sbsearch tui displaying resource logs output

Usage

To see general usage:

sbsearch -h
Usage: sbsearch --support-bundle-path <SUPPORT_BUNDLE_PATH> --resource-name <RESOURCE_NAME>

Options:
  -s, --support-bundle-path <SUPPORT_BUNDLE_PATH>
  -r, --resource-name <RESOURCE_NAME>
  -h, --help                                       Print help
  -V, --version                                    Print version

For example, to search for logs relevant to the PVC pvc-tg13d9d2-f7g3-46t1-770d-13wa01c36f01 in the support bundle located at ~/Downloads/supportbundle_5t66d62c-u8a4-4311-8426-1d8493b2b576_2024-10-17T18-38-27Z:

sbsearch \
  -s ~/Downloads/supportbundle_5t66d62c-u8a4-4311-8426-1d8493b2b576_2024-10-17T18-38-27Z \
  -r pvc-tg13d9d2-f7g3-46t1-770d-13wa01c36f01

Unarchive the support bundle before passing its path to sbsearch.

Development

To compile the code:

make check

To run unit tests:

make test

To run the program in debug mode:

make run SUPPORT_BUNDLE_PATH=<path_to_support_bundle> RESOURCE_NAME=<resource_name>

To build the release:

make release

License

See License.

About

A Harvester support bundle tool that displays resource logs in chronological order.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published