Skip to main content

mongo-x-ray-ftdc

CI PyPI

FTDC (Full Time Diagnostic Data Capture) analysis plugin for x-ray.

Install

pip install mongo-x-ray mongo-x-ray-ftdc

Usage

x-ray ftdc /var/lib/mongo/diagnostic.data
x-ray ftdc /var/lib/mongo/diagnostic.data 2026-06-17T08:00:00Z 2026-06-17T10:00:00Z
x-ray ftdc --discover /data/

Compatibility

Supports MongoDB 5.0 and above on all topologies:

Replica Set Sharded Cluster Standalone
✅ ✅ ✅

Parameters

x-ray ftdc [-h] [-s CHECKSET] [-o OUTPUT] [-f {markdown,html,pdf}] [--no-browser]
           [--svg] [-r RATE] [--discover] ftdc_path [start_time] [end_time]
Argument Description Default
ftdc_path Path to a directory containing FTDC files. required
start_time Inclusive UTC start time in ISO-8601 format. first data point
end_time Inclusive UTC end time in ISO-8601 format. last data point
-s, --checkset Checkset to run. default
-o, --output Output folder path. output/
-f, --format Output format: markdown, html or pdf (PDF also keeps Markdown and HTML). html
--no-browser Do not open the generated report in the browser. false
--svg Reference SVG charts in the report instead of converting them to PNG. false
-r, --rate FTDC sampling rate (0-1). 1 / number of ingested files
--discover Recursively search the given path for folders containing FTDC files. false

Report

The baseline analysis reports the capture timespan and the effective sample rate, then groups metrics into Workload, Read/Write Operations and Latencies, and Performance sections. It includes operation rates and latencies, host memory and CPU utilization, WiredTiger cache utilization, queue depth for each block device, and free-space and utilization charts for every reported mount point. Each metric shows its peak, average, unit, and a chart saved under the report output's charts directory.

start_time and end_time are inclusive UTC ISO-8601 timestamps. When omitted, the first and last data points in the archive are used.

Chart configuration

Chart dimensions can be tuned in the checkset config:

"BaselineAnalysisItem": {
  "chart_width": 450,
  "chart_height": 150
}

The fallback dimensions are defined in mongo_x_ray_ftdc/charts.py. Vertical grid lines are spaced every 100 pixels and horizontal grid lines every 50 pixels. Workload and operation/latency charts use lines. Performance charts use bars. Member-state charts are always 450×50 pixel bars.

AI Analysis (Optional)

FTDC reports can include AI-generated summaries for each section (Workload, Ops and Latencies, Performance). The analysis appears as a brief 2-3 sentence assessment at the end of each section, flagging potential issues or confirming normal operation.

Configuration — set the following environment variables:

Variable Required Default Description
OPENAI_API_KEY Yes — API key for the AI service
OPENAI_BASE_URL No OpenAI default Compatible API endpoint (e.g. DeepSeek)
AI_MODEL No gpt-4o Model name to use

If OPENAI_API_KEY is not set, AI analysis is silently skipped.

Example .env file:

OPENAI_API_KEY="sk-..."
OPENAI_BASE_URL="https://api.deepseek.com"
AI_MODEL="deepseek-v4-pro"

Or export directly in the shell:

export OPENAI_API_KEY="sk-..."
x-ray ftdc /var/lib/mongo/diagnostic.data

Analysis Items

Item Purpose
BaselineAnalysisItem Summarize the workload and performance of an FTDC capture: Workload, Ops and Latencies and Performance sections with charts, plus an optional AI-generated summary per section.
MetadataReviewItem Display all FTDC metadata in tabbed code blocks for review.

Development

Requires Python 3.10+, MongoDB 5.0 or later, and the mongo-x-ray core package.

make unit-test   # run the unit tests
make lint        # ruff check + ruff format --check
make minify      # minify templates

Metadata

Release files for mongo-x-ray-ftdc 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-ftdc 2.1.1
File Size Uploaded Provenance Actions
mongo_x_ray_ftdc-2.1.1.tar.gz 45.7 kB With provenance Details for mongo_x_ray_ftdc-2.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 83.2 kB

Release files / mongo_x_ray_ftdc-2.1.1.tar.gz

Download URL mongo_x_ray_ftdc-2.1.1.tar.gz
Size 45.7 kB
Tags Source
SHA-256 checksum
How to use checksums
8f04685faa0c5d2c9f85becedc9c124ec1bf1945b0e6d18a3a8567b2c55e3378
BLAKE2b-256 checksum
How to use checksums
f6062f5d3cdcaf34426fc130fef4760b1c0b0ac94b27fca21d45506a634f2662
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_ftdc-2.1.1-py3-none-any.whl

Download URL mongo_x_ray_ftdc-2.1.1-py3-none-any.whl
Size 37.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
040a6eab85955217e1324b72891b1f1a1d017e70ae005a4022964558d02ee7ae
BLAKE2b-256 checksum
How to use checksums
d2b69389e6ab5082f714e8060badaaa867ed0610173630c0088bcb1d3a828eea
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-ftdc 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_ftdc-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