Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/meaksh/uyuni-logs-visualizer
A tool to graphically visualize events from Uyuni logs and Salt events bus
https://github.com/meaksh/uyuni-logs-visualizer
logging opensuse python salt saltstack spacewalk suse suse-manager uyuni
Last synced: about 1 month ago
JSON representation
A tool to graphically visualize events from Uyuni logs and Salt events bus
- Host: GitHub
- URL: https://github.com/meaksh/uyuni-logs-visualizer
- Owner: meaksh
- License: apache-2.0
- Created: 2021-11-12T13:31:39.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-01-04T16:37:49.000Z (about 3 years ago)
- Last Synced: 2024-11-12T14:54:02.542Z (2 months ago)
- Topics: logging, opensuse, python, salt, saltstack, spacewalk, suse, suse-manager, uyuni
- Language: Python
- Homepage:
- Size: 88.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# uyuni-logs-visualizer [![pre-commit](https://github.com/meaksh/uyuni-logs-visualizer/actions/workflows/pre-commit.yml/badge.svg)](https://github.com/meaksh/uyuni-logs-visualizer/actions/workflows/pre-commit.yml)
A tool to graphically visualize events from Uyuni logs and Salt events bus. The tool generates a HTML output where you can navigate the collected events using your web browser.When running this tool, you provide a path where the different logs files are stored, i.a. "rhn_web_ui.log", "master", "salt-events.txt", ..., or you can alternatively pass the path to a "supportconfig" tarball, then the tool will temporary unpack the supportconfig and collect the logs file from it.
The generated HTML is using:
- https://github.com/visjs/vis-timeline### Runtime requirements:
- Python3
- Jinja2### How to setup:
- Install `python3-jinja2` package or alternatively get `jinja2` python library using pip:
```console
# pip install -r requirements.txt
```### How to run it:
```console
# python3 uyuni-logs-visualizer -h
usage: uyuni-logs-visualizer [-h] [-o OUTPUT_FILE]
[-f FROM_DATETIME] [-u UNTIL_DATETIME]
[-p LOGS_PATH] [-s SUPPORTCONFIG_PATH]Generate a HTML view of Uyuni logs.
optional arguments:
-h, --help show this help message and exit
-o OUTPUT_FILE, --output OUTPUT_FILE
generated output HTML file (default: output.html)
-f FROM_DATETIME, --from FROM_DATETIME
Only events after this datetime. (Example: 2021-11-11T16:23:28.804535)
-u UNTIL_DATETIME, --until UNTIL_DATETIME
Only events before this datetime. (Example: 2021-11-11T16:23:28.804535)
-p LOGS_PATH, --logs-path LOGS_PATH
Path to logs files
-s SUPPORTCONFIG_PATH, --supportconfig-path SUPPORTCONFIG_PATH
Path to supportconfig tarball
```### Example execution:
```console
# python3 uyuni-logs-visualizer -s /tmp/example_supportconfig.txz -f 2022-01-03T14:01:05.093000 -u 2022-01-04T10:01:05.093000__ __ _ __ _ ___ ___
/ / / /_ ____ ______ (_) / / ____ ____ ______ | | / (_)______ ______ _/ (_)___ ___ _____
/ / / / / / / / / / __ \/ / / / / __ \/ __ `/ ___/ | | / / / ___/ / / / __ `/ / /_ / / _ \/ ___/
/ /_/ / /_/ / /_/ / / / / / / /___/ /_/ / /_/ (__ ) | |/ / (__ ) /_/ / /_/ / / / / /_/ __/ /
\____/\__, /\__,_/_/ /_/_/ /_____/\____/\__, /____/ |___/_/____/\__,_/\__,_/_/_/ /___/\___/_/
/____/ /____/Options:
* From datetime: 2022-01-03T14:01:05.093000
* Until datetime: 2022-01-04T10:01:05.093000
* Path to supportconfig tarball: /tmp/scc_suma-42-srv_220104_1049.txzExtracting supportconfig at: /tmp/tmpbf9ne78p
Collecting logs:
* WARN: Couldn't find any logs files for Salt Event Bus:
- salt-events.txt not found
- salt-event.log not found
- var/log/rhn/salt-event.log not found
- spacewalk-debug/salt-logs/salt/salt-event.log not found* Found Salt Master logs file at: /tmp/tmpbf9ne78p/scc_suma-42-srv_220104_1049/spacewalk-debug/salt-logs/salt/master
* Found Salt API logs file at: /tmp/tmpbf9ne78p/scc_suma-42-srv_220104_1049/spacewalk-debug/salt-logs/salt/api
* Found Java Web UI logs file at: /tmp/tmpbf9ne78p/scc_suma-42-srv_220104_1049/spacewalk-debug/rhn-logs/rhn/rhn_web_ui.logCleanup:
* Temporary files removed: /tmp/tmpbf9ne78pSummary:
* 1541 events were collected.
* First event at: 2022-01-03T14:01:59.479000
* Last event at: 2022-01-04T10:01:05.093000Results:
* Results HTML file: output.html____ __
/ __ \____ ____ ___ / /
/ / / / __ \/ __ \/ _ \ / /
/ /_/ / /_/ / / / / __/ /_/
/_____/\____/_/ /_/\___/ (_)```
Generated HTML:
![image](https://user-images.githubusercontent.com/7229203/141479052-9fd712eb-45aa-4816-a0a1-7b599ec4a81f.png)### RPM packages:
We are building RPM packages for this project at Open Build Service: https://build.opensuse.org/package/show/home:PSuarezHernandez/uyuni-logs-visualizer### Authors:
- Pablo Suárez Hernández -