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, log and hc 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 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:
- 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.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.1.0
File Size Uploaded Provenance Actions
mongo_x_ray-2.1.0.tar.gz 42.0 kB With provenance Details for mongo_x_ray-2.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 84.7 kB

Release files / mongo_x_ray-2.1.0.tar.gz

Download URL mongo_x_ray-2.1.0.tar.gz
Size 42.0 kB
Tags Source
SHA-256 checksum
How to use checksums
fb0a169b3202204e46c1359319c4d37777bd7a586a9a6a49781e31078ade9974
BLAKE2b-256 checksum
How to use checksums
0f8474a5ea2fc69480d802bded3de2c4c234835c25ed416c0b9f538498f9fa60
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 Sep 10, 2026.

Transparency log

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

Download URL mongo_x_ray-2.1.0-py3-none-any.whl
Size 42.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6242e4cc6ee7db1b71e9d34838e78fc5e1aeb89020ca6bf8228f0f68a12f2b18
BLAKE2b-256 checksum
How to use checksums
300116ef64572bac31fe37ee111b52c66c21f12e92f20cccfa846d7c97ea8407
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 Sep 10, 2026.

Transparency log

Security for mongo-x-ray 2.1.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.1.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 Sep 10, 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