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.
To see general usage:
sbsearch -hUsage: sbsearch --support-bundle-path <SUPPORT_BUNDLE_PATH> --keyword <KEYWORD>
Options:
-s, --support-bundle-path <SUPPORT_BUNDLE_PATH>
-k, --keyword <KEYWORD>
-h, --help Print help
-V, --version Print versionFor 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-13wa01c36f01Unarchive the support bundle before passing its path to sbsearch.
| Keys | Actions |
|---|---|
| Up/Down arrow keys | Move up/down by one line |
g |
Go to the beginning of the log |
G |
Go to the end of the log |
| Keys | Actions |
|---|---|
| Left/Right arrow keys | Move left/right by one page |
0 |
Go to the first page |
9 |
Go to the last page |
| Keys | Actions |
|---|---|
/ |
Enter search mode |
| Enter | Execute search |
c |
Clear search |
| Keys | Actions |
|---|---|
s |
Save the current filtered logs to a file |
q |
Quit the program |
sbsearch uses the following color scheme to highlight different line context:
- warning in yellow
- error in red
- currently selected line in light magenta
- search matches in blue
To compile the code:
make checkTo run unit tests:
make testTo run the program in debug mode:
make run SUPPORT_BUNDLE_PATH=<path_to_support_bundle> KEYWORD=<keyword>To build the release:
make releaseSee License.
