A diagnostic bundle analyzer for D2iQ products
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:
- Decompresses the bundle and the files within it
- Reads JSON and log files to find common problems and warns about them
d2yabt is neither supported nor endorsed by D2iQ.
d2yabt is on PyPI so install it via pip:
pip3 install d2yabt
You could use the Docker image if you prefer:
docker run --rm -it -v path/to/bundle:/mnt/bundle jwhitemeso/d2yabt:latest bash
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:
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 email@example.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'.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size d2yabt-1.0.5-py3-none-any.whl (15.7 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size d2yabt-1.0.5.tar.gz (11.8 kB)||File type Source||Python version None||Upload date||Hashes View|