Skip to main content

x-ray

Makefile Release PyPI

This project aims to create tools for MongoDB analysis and diagnosis.

The mongo-x-ray package provides the CLI and the report framework. The analysis commands (log, ftdc, ...) are provided by separate mongo-x-ray-* plugin packages — install the ones you need alongside the core, and run x-ray --help to see which commands are available in your environment.

See How to Install below.

1 How to Install

1.1 PyPi

1.1.1 Install with Pip

The easiest and recommended way to install x-ray is to use pip:

# Install the framework and health check, log analysis, and basic ftdc analysis.
pip install mongo-x-ray mongo-x-ray-hc mongo-x-ray-log mongo-x-ray-ftdc

Only the plugins you actually use are required — the core alone has no commands. Available plugins:

Plugin Command(s) Description
mongo-x-ray-hc hc MongoDB health check.
mongo-x-ray-ftdc ftdc Analyze MongoDB FTDC files
mongo-x-ray-log log Analyze MongoDB log files

1.1.2 Build from Source

git clone https://github.com/mongodb-ps/ce-mongo-x-ray
cd ce-mongo-x-ray
pip install .

1.2 PyInstaller

1.2.1 Prebuilt Binaries

Currently the prebuilt binaries are available on 3 platforms:

  • Ubuntu 22.04 (AMD64)
  • MacOS 14 (ARM64)
  • Windows 2022 (AMD64)

Download them from Releases.

The prebuilt binaries bundle the ftdc, log and hc plugins, so those commands work out of the box; the other plugins are not included in the binary.
For information about using each plugin, please refer to their Github repos:

1.2.2 Build from Source

x-ray requires Python >= 3.10 and is tested on Python 3.10. On MacOS or Linux distributions, you can use the make command to build the binary:

git clone https://github.com/mongodb-ps/ce-mongo-x-ray
cd ce-mongo-x-ray
make deps # if it's the first time you build the project
make plugin-deps # installs the plugins that ship in the binary (log, ftdc, hc)
make # equal to `make build`

The binary bundles every mongo-x-ray-* plugin installed in the build environment — make plugin-deps installs log, ftdc and hc; install more plugins in the venv if you want them bundled too.

There are other make targets. Use make help to find out.

For Windows users, if make command is not available. You can use Python commands to build the binary:

python.exe -m venv .venv
.venv\Scripts\python.exe -m pip install --upgrade pip
.venv\Scripts\python.exe -m pip install -e ".[dev]"
.venv\Scripts\python.exe -m PyInstaller --onefile `
  --name x-ray `
  --add-data="templates;templates" `
  --add-data="libs;libs" `
  --icon="misc/x-ray.ico" `
  --hidden-import=openai `
  x-ray

1.3 For Developers

For developers, use make deps to prepare venv and dependencies

make deps

Or

python3 -m venv .venv
python3 -m pip install --upgrade pip
python3 -m pip install -e ".[dev]"

Useful development targets (see make help):

  • make unit-test — run the unit tests in the core and every local plugin checkout under plugins/.
  • make lint — ruff check + ruff format --check.
  • make minify — minify the HTML/JS/CSS templates.

2 Using the Tool

x-ray [-h] [-q] [-c CONFIG] {log,ftdc}

The available commands come from the installed mongo-x-ray-* plugins. Run x-ray --help to see the commands available in your environment, and x-ray <command> --help for usage and examples of a specific command.

Argument Description Default
-q, --quiet Quiet mode. false
-h, --help Show the help message and exit. n/a
-c, --config Path to configuration file. Built-in config.json
command Command to run:
- hc: Health check.
- log: Log analysis.
- ftdc: FTDC analysis.
None

Besides, you can use environment variables to control some behaviors:

  • ENV=development For developing. It will change the following behaviors:
    • Formatted the output JSON for for easier reading.
    • The output will not create a new folder for each run but overwrite the same files.
  • LOG_LEVEL: Can be DEBUG, ERROR or INFO (default).

Metadata

Release files for mongo-x-ray 2.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mongo-x-ray 2.1.1
File Size Uploaded Provenance Actions
mongo_x_ray-2.1.1.tar.gz 42.3 kB With provenance Details for mongo_x_ray-2.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mongo-x-ray 2.1.1
File Interpreter ABI Platform Actions
mongo_x_ray-2.1.1-py3-none-any.whl Python 3 none any Details for mongo_x_ray-2.1.1-py3-none-any.whl

Total release size: 85.1 kB

Release files / mongo_x_ray-2.1.1.tar.gz

Download URL mongo_x_ray-2.1.1.tar.gz
Size 42.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c83e9120f4761be72862b394839f266cc5781e9d3c3be6d4ca07e95bf085d190
BLAKE2b-256 checksum
How to use checksums
f73fc3f8e0f2991e2ac2fc736311a40cca16a862b4d7c628735e08437db8bc0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Release files / mongo_x_ray-2.1.1-py3-none-any.whl

Download URL mongo_x_ray-2.1.1-py3-none-any.whl
Size 42.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6e1229c33aa984e850d744d0a213da3117278705dbfd21fe133a8e5dbb42e8ac
BLAKE2b-256 checksum
How to use checksums
216c80c421c92b4baf6b05724b3f46b6ed8315bd0172521f587207d780085294
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Security for mongo-x-ray 2.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mongo_x_ray-2.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page