Giter VIP home page Giter VIP logo

uyuni-logs-visualizer's Introduction

uyuni-logs-visualizer pre-commit

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:

Runtime requirements:

  • Python3
  • Jinja2

How to setup:

  • Install python3-jinja2 package or alternatively get jinja2 python library using pip:
# pip install -r requirements.txt

How to run it:

# 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:

# 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.txz

  Extracting 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.log

  Cleanup:
    * Temporary files removed: /tmp/tmpbf9ne78p

  Summary:
    * 1541 events were collected.
    * First event at: 2022-01-03T14:01:59.479000
    * Last event at: 2022-01-04T10:01:05.093000

  Results:
    * Results HTML file: output.html

    ____                      __
   / __ \____  ____  ___     / /
  / / / / __ \/ __ \/ _ \   / /
 / /_/ / /_/ / / / /  __/  /_/
/_____/\____/_/ /_/\___/  (_)

Generated HTML: image

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:

uyuni-logs-visualizer's People

Contributors

meaksh avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.