Code Monkey home page Code Monkey logo

mm-health's Introduction

Healthcheck tool

Simple Mattermost health check tool. This tool accepts a support packet and generates a markdown file containing the results of the investigation.

Getting Started

  1. Ensure you have go installed on your OS. If you do not, follow the guide here

  2. Download the mmhealth tool with go install

    go install github.com/coltoneshaw/mmhealth@latest
  3. Ensure you have Docker setup and running on your computer.

How to use

The easiest way to use this tool is to just point it at a support packet and generate the report, like below.

mmhealth generate -p ./mattermost_support_packet_2023-09-21-11-55.zip

This will output a healthcheck-report.pdf into your current directory.

You can modify the report name by passing --outputName or -o.

Legend

Statuses

  • pass - The Check passed
  • warn - The check did not pass, but it is just a warning right now. All adoption / proactive checks that fail are a warn.
  • fail - The check failed and it should be addressed
  • ignore - The check can be ignored.

Severity

  • urgent - Highest priority check and should be addressed immediately.
  • high - The issue should be scheduled in the next change window.
  • medium - Can be addressed later, also informational.
  • low - Can be ignored, but fixing could provide benefits.

Types

  • Proactive - A proactive measure to increase the health, reliability, or otherwise inside of Mattermost.
  • Adoption - Better configuration of Mattermost for optimal usage and adoption.
  • Health - Environment health checks that should be remediated if failed.

Contributing

Setup the dev environment

  1. Clone the repo
  2. Start docker desktop
  3. Run make buildDocker to generate the local docker image
  4. Run make build to build the binary
  5. Run make test to confirm everything is working

Now to use the tool you can run ./bin/mmhealth and use the newly updated code.

Updating / adding the checks

Note: This process is a bit clunky right now and needs to be improved. The easiest way is to use ./bin/mmhealth add, go through the automated process, and then add it to the sheet in the correct format. This way gives it a unique ID that's next in line and properly keeps it in sync.

The checks are provided from the Findings Report, parsed via CSV and updated in the ./mmhealth/files/checks.yaml file.

To parse a csv:

  1. Add a check on the Findings report
    • Note that you need to give the check a unique ID for it to be parsed later on.
  2. Download the finding report from Google as a csv
  3. Copy to the root dir here and name it healthcheck.csv.
  4. Run make build
  5. Run ./bin/mmhealth parsecsv
  6. Check the git diff for exactly what's changed. You should see the new checks here.
  7. Run make test to confirm no checks have broke
  8. Update or add the checks broken checks

Modifying the template

When you modify the template it requires a rebuild of docker.

  1. Make changes to the template
  2. run make buildDocker to rebuild the docker image
  3. run ./bin/mmhealth generate to use the new template

Once you are done, be sure to follow the docker release info below.

Making Docker Release

When you need to adjust anything inside the ./docker/dockerfile or ./template, you'll need to manually adjust the DOCKER_VERSION to trigger a rebuild.

Making mmhealth Release

Just release by adding a tag on github and publishing, everything else is handled.

mm-health's People

Contributors

coltoneshaw 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.