Skip to main content

A diagnostic bundle analyzer for D2iQ products

Project description

d2yabt (Yet Another Bundle Tool) is used to analyze DC/OS diagnostic bundles, DC/OS service diagnostic bundles, and Konvoy diagnostic bundles. It performs many of the same functions as Andrey Dyatlov's bun and Dustin Nemes' dcosqj. Essentially it does two things:

  1. Decompresses the bundle and the files within it
  2. Reads JSON and log files to find common problems and warns about them

To install

d2yabt is on PyPI so install it via pip:

pip3 install d2yabt

To run

d2yabt's executable is yabt. Run it with a bundle as the argument and d2yabt will extract the bundle to the current working directory and move the bundle file to the current directory:

yabt path/to/bundle.zip

d2yabt can also be used on an extracted bundle. Either give it the path to the bundle directory as an argument or cd into it and run yabt with no arguments:

cd path/to/bundle
yabt

Note that pip will install d2yabt to wherever your user base is set to. You'll need to add its bin directory to your PATH:

export PATH="$PATH:$(python3 -m site --user-base)/bin"

Manual install (via git)

First, you'll need to install d2yabt's dependencies:

pip3 install pandas

Next, clone the repo:

git clone git@github.com:jeffwhite530/d2yabt.git

Finally, adjust PYTHONPATH so Python can find the library. Assuming d2yabt is in your home directory, run it like so:

PYTHONPATH=$PYTHONPATH:~/d2yabt/lib ~/d2yabt/bin/yabt path/to/bundle.zip

To add checks

d2yabt was designed to be easy to extended and have a simple to understand architecture. Each supported bundle type is broken into its own namespace:

DC/OS --> d2yabt.dcos
Service --> d2yabt.service
Konvoy --> d2yabt.konvoy

Each of those has a "check" library where health checks are defined. These map to the following files:

d2yabt.dcos.check --> lib/d2yabt/dcos/check.py
d2yabt.service.check --> lib/d2yabt/service/check.py
d2yabt.konvoy.check --> lib/d2yabt/konvoy/check.py

To add a check, add a function to the appropriate check.py file. Have that function do anything you want (search a log file, parse a JSON/YAML file, etc.). Then simply add a call to that function in bin/yabt in the section labeled '# Health checks'.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for d2yabt, version 1.0.3
Filename, size File type Python version Upload date Hashes
Filename, size d2yabt-1.0.3-py3-none-any.whl (15.5 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size d2yabt-1.0.3.tar.gz (11.5 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page