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:

pip install mongo-x-ray 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-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 and log plugins, so those commands work out of the box; the other plugins are not included in the binary.

1.2.2 Build from Source

x-ray is tested on Python 3.9.22. 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)
make # equal to `make build`

The binary bundles every mongo-x-ray-* plugin installed in the build environment — make plugin-deps installs log and ftdc; 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:
- 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.0.0

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.0.0
File Size Uploaded Provenance Actions
mongo_x_ray-2.0.0.tar.gz 47.1 kB With provenance Details for mongo_x_ray-2.0.0.tar.gz

Built distribution (wheel)

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

Total release size: 94.2 kB

Release files / mongo_x_ray-2.0.0.tar.gz

Download URL mongo_x_ray-2.0.0.tar.gz
Size 47.1 kB
Tags Source
SHA-256 checksum
How to use checksums
fed1da343b2124774e4f822262630eb229976efeba779f170f946c7652762bfd
BLAKE2b-256 checksum
How to use checksums
861fe749432f17f4190a310c8aee312075a9424b6c5e45d6af01e25c76b3c936
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 31, 2026.

Transparency log

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

Download URL mongo_x_ray-2.0.0-py3-none-any.whl
Size 47.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f29bc39be64c45ac24fce599a6f42ad6ecbd8a250bd933673d79b51f0c78b58a
BLAKE2b-256 checksum
How to use checksums
d8c071bd01916654d501def2521503bd1dd66e4c590254fcf42088a9c692729e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 31, 2026.

Transparency log

Security for mongo-x-ray 2.0.0

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.0.0.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 Aug 31, 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