https://github.com/zaneb/bmo-log-parse
Utility for filtering and displaying logs from the Metal³ baremetal-operator
https://github.com/zaneb/bmo-log-parse
baremetal-provisioning metal3
Last synced: 8 months ago
JSON representation
Utility for filtering and displaying logs from the Metal³ baremetal-operator
- Host: GitHub
- URL: https://github.com/zaneb/bmo-log-parse
- Owner: zaneb
- License: apache-2.0
- Created: 2020-05-19T15:08:54.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-08-12T04:15:59.000Z (about 1 year ago)
- Last Synced: 2025-02-06T05:11:21.816Z (8 months ago)
- Topics: baremetal-provisioning, metal3
- Language: Python
- Homepage:
- Size: 70.3 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Metal³ baremetal-operator log parser
This is tool to produce human-readable logs from the structured log output of
the [baremetal-operator](https://github.com/metal3-io/baremetal-operator) from
the [Metal³](https://metal3.io/) project.It is written in Python and requires Python 3.6 or later.
## Installation
### On Fedora or CentOS/RHEL
Distro packages are available in Copr:
```bash
sudo dnf copr enable zaneb/autopage
sudo dnf install python3-bmo-log-parse
```### Everywhere else
Install using pip:
```bash
pip3 install --user git+https://github.com/zaneb/bmo-log-parse
```This automatically installs dependencies also. (Specifically, the
[autopage](https://pypi.org/project/autopage/) library is a requirement.)## Usage
By default, the tool reads from stdin and writes to stdout. It can be used with
either an existing log file or a `tail -f`-style stream. If the output is not
piped or redirected, a pager is automatically invoked.Several filters are available to winnow the output.
usage: bmo-log-parse [-h] [-c [CONTROLLER] | -p | -w [WEBHOOK]] [--error]
[--verbose] [-n NAME] [--namespace NAMESPACE]
[-s START] [-e END]
[--list-names | --list-namespaces]
[logfile]positional arguments:
logfile Input logfile (or "-" to read stdin)options:
-h, --help show this help message and exit
-c [CONTROLLER], --controller-only [CONTROLLER]
Include only controller module logs
-p, --provisioner-only
Include only provisioner module logs
-w [WEBHOOK], --webhook-only [WEBHOOK]
Include only webhook logs
--error Include only logs at ERROR level
--verbose Include verbose error logs
-n NAME, --name NAME Filter by a particular host name
--namespace NAMESPACE
Filter by a particular host namespace
-s START, --start START
Skip ahead to a given time
-e END, --end END Stop reading at a given time
--list-names List the names of hosts in the log
--list-namespaces List the namespaces of hosts in the log## Testing
Run the unit tests using `tox`.