mugshine

command module
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

README

mugshine logo

mugshine is an interactive console application with a text user interface aimed to open must-gathers and inspects logs generated by OpenShift diagnostic commands. Its main purpose is to quickly identify some classes of error in OpenShift clusters and easily navigate container logs.

Demo

mugshine demo

Features

  • Support for 3 types of OCP resources: pods/containers, cluster operators and nodes.
  • Recursive check for errors: an error on a resource causes all the levels above to be marked in red. E.g. if a container is in Failed status, also the relative pod, the namespace and the "Namespaces" menu entry will be in error, so that it's clear where the problem lies.
  • All the resources have an action associated to enter key (containers show logs, all the other resources show their manifest). Logs and manifests are opened with less, so it's possible to search/filter them with all the power of regexp.
  • All the columns are filterable.
  • Mugshine tries to be smart in resizing the columns, when there is not enough space to show them fully: the focused one has priority over the next one, while the next one has priority over all the others.
  • Header panel with basic cluster information.
  • Unobtrusive and expandable mini help on the bottom, with all the available keys/functions.

Installation

Mugshine requires less installed on the machine.

$ go install github.com/dcommisso/mugshine@latest

or you can download the compiled version for Linux x86_64 from releases section.

Build mugshine without GLIBC dependency

On machines with old glibc version, a mugshine binary built with a newer glibc may fails with errors like: /lib64/libc.so.6: version `GLIBC_2.32' not found.

If building mugshine directly on that machine is not an option, is possible to build a binary without glibc dependency by disabling cgo:

$ export CGO_ENABLED=0
$ go build

Relation with OMC

Mugshine is not intended as omc replacement. Omc is a non-interactive application, therefore it's more flexible than mugshine. It also supports a large number of OCP resources, while mugshine only supports a few. Supporting all of them is out of the scope of mugshine, since it's main job is to easily spot the interesting places to look during troubleshooting and quickly switching between container logs. Ideally omc and mugshine complement each other: mugshine for first approach to troubleshoot (and to quickly jump from one log/manifest to another), omc for deeper analysis.

TODO and limitations

Mugshine is still at its first release. It should be considered in beta: bugs are expected and some features have yet to be developed. Here are some of them:

  • Color theme customization. I designed the mugshine color theme, but:

    1. I'm definitely not an UX designer.
    2. The theme color I designed is totally arbitrary. I like it because (according to my taste) is readable but not too boring. But obviously everyone has their own taste and I don't want to impose my color choices on others.
    3. At the moment it only works on black background.
    4. Accessibility is important and I want to give users the freedom to create custom themes.
  • The age field is missing from OCP resources.

  • Failed filter. I would love having a way to filter out the failed resources.

  • Omc support to malformed must-gathers is better than mugshine's. I want to improve both the robustness and the error messages.

  • Tests. At the moment only the module to parse must-gather is covered by tests. Probably I should find a good way to test the interactive part as well.

About the name

So, why is it called Mugshine? The initial name was "img" which stood for "Interactive Must Gather", but this name has two fundamental problems:

  1. There are probably dozens of image-processing commands called like this.
  2. It has zero personality.

Mugshine, on the other hand, it's more poetic: it sounds like "sunshine", or like "mug" + "shine". In fact it's: MUst Gather SHINE. "Shine" can refers both to the fact that the application is colorful and to the other meaning of "shine": throw light, make clear something; in this case: shed light on must-gathers.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL