mongo-x-ray-ftdc
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.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mongo_x_ray_ftdc-2.1.0.tar.gz | 45.7 kB | With provenance | Details for mongo_x_ray_ftdc-2.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mongo_x_ray_ftdc-2.1.0-py3-none-any.whl | Python 3 | none | any | Details for mongo_x_ray_ftdc-2.1.0-py3-none-any.whl |
Total release size: 83.2 kB
Release files / mongo_x_ray_ftdc-2.1.0.tar.gz
| Download URL | mongo_x_ray_ftdc-2.1.0.tar.gz |
|---|---|
| Size | 45.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
27772ebfd70f8782d702928791645c88239f94869a035119c5250fb3c0791b09
|
|
BLAKE2b-256 checksum How to use checksums |
97ab4b0fe12c576d8eded5614e6eb80226e0201f404a8579a25a283fbdf0049c
|
| 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 logRelease files / mongo_x_ray_ftdc-2.1.0-py3-none-any.whl
| Download URL | mongo_x_ray_ftdc-2.1.0-py3-none-any.whl |
|---|---|
| Size | 37.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bb1017a7951fc00e243196e0aaa032f56bf8a117c652639c59f0d8f556bc40be
|
|
BLAKE2b-256 checksum How to use checksums |
b7269a62d23d1cc93cf11cbd9a5b0c10b3dbd8576f3440e67de01668670e62b6
|
| 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 logSecurity for mongo-x-ray-ftdc 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.
Attestation for mongo_x_ray_ftdc-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 logA 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.