Skip to main content

mongo-x-ray-log

CI PyPI

MongoDB log analysis plugin for x-ray.

Install

pip install mongo-x-ray mongo-x-ray-log

Usage

x-ray log /var/log/mongodb/mongod.log
x-ray log /var/log/mongodb/ 2026-07-20T08:00:00Z 2026-07-20T10:00:00Z
x-ray log /path/to/mongod.log -f html -o /path/to/output/
# Analyze a random 10% of a large log
x-ray log -r 0.1 mongodb.log
# Discover log folders recursively
x-ray log --discover /var/log/

Compatibility

Supports MongoDB 5.0 and above on all topologies:

Replica Set Sharded Cluster Standalone
✅ ✅ ✅

Parameters

x-ray log [-h] [-s CHECKSET] [-o OUTPUT] [-f {markdown,html,pdf}] [--no-browser]
          [-r RATE] [--top TOP] [--discover] log_file [start_time] [end_time]
Argument Description Default
log_file Path to the MongoDB log file, or a folder of log files to analyze. required
start_time Inclusive UTC start time in ISO-8601 format. first log line
end_time Inclusive UTC end time in ISO-8601 format. last log line
-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
-r, --rate Log sampling rate, e.g. 1 for all logs, 0.1 for 10% of logs. 1
--top Top N slow queries to list. 10
--discover Recursively search the given path for folders containing log files. false

Analysis Items

Item Purpose
InfoItem Basic information about the MongoDB instance.
ClientMetaItem Visualize client metadata (application, driver, OS, client IPs).
ConnectionRateItem Analyze the rate of connections created and ended over a time window.
LogRateItem Show the rate at which different log messages (grouped by log ID) appear over time.
SlowItem Identify the top N slowest operations (table with sample viewers) and chart them over time as tabs (duration / scanned / scanned objects).
SlowRateItem Analyze the rate of slow queries.
StateTraceItem Visualize replica set member state changes over time.
WEFItem Visualize warning, error and fatal log messages.

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-log 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-log 2.1.0
File Size Uploaded Provenance Actions
mongo_x_ray_log-2.1.0.tar.gz 63.6 kB With provenance Details for mongo_x_ray_log-2.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 149.7 kB

Release files / mongo_x_ray_log-2.1.0.tar.gz

Download URL mongo_x_ray_log-2.1.0.tar.gz
Size 63.6 kB
Tags Source
SHA-256 checksum
How to use checksums
dc927276618b411bf7f3bfdb3fa79001a62c83541b410b89390dd59533b96bfb
BLAKE2b-256 checksum
How to use checksums
594c9013219ac386d0f1fb132ab28eed9d014f19ad1c41802e4210dc5e6cab9a
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_log-2.1.0-py3-none-any.whl

Download URL mongo_x_ray_log-2.1.0-py3-none-any.whl
Size 86.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0a3443d867366957caba48616927b83cca97f33f59432d4a230a790ef0a06beb
BLAKE2b-256 checksum
How to use checksums
ccab7965280d7b8ccda83c60b1abfa4d594d59e278832a231561fee02f378d66
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-log 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_log-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