Skip to main content

mongo-x-ray-log

CI

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.
SlowRateItem Analyze the rate of slow queries.
SlowChartItem Scatter plot of slow operations over time, each point colored by namespace.
TopSlowItem Identify the top N slowest operations from the log entries.
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.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-log 2.0.0
File Size Uploaded Provenance Actions
mongo_x_ray_log-2.0.0.tar.gz 53.5 kB With provenance Details for mongo_x_ray_log-2.0.0.tar.gz

Built distribution (wheel)

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

Total release size: 127.8 kB

Release files / mongo_x_ray_log-2.0.0.tar.gz

Download URL mongo_x_ray_log-2.0.0.tar.gz
Size 53.5 kB
Tags Source
SHA-256 checksum
How to use checksums
3ec6dad834ea0aadd6bef93e4e49fcb1085a54ba2b2b0c1e6dfc2b0b0b6bad8c
BLAKE2b-256 checksum
How to use checksums
3f181ee9ea549899142ad3e8507fe65a9233e59227f0afd21b32dada727daeb1
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_log-2.0.0-py3-none-any.whl

Download URL mongo_x_ray_log-2.0.0-py3-none-any.whl
Size 74.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
53c9c317d7064ed850c5c5050284c6b87fd132e319da63864a372dd81af2dad3
BLAKE2b-256 checksum
How to use checksums
158e983241e2b3745b5193f97570e875c133094873ed033ff7ce60a6094caa07
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-log 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_log-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