Skip to main content

Get the MongoDB database statistic to a local CSV file

Project description

Mostats 📊


PyPI Downloads GitHub repo size GitHub last commit (by committer)

Get the MongoDB database statistic e.g : database name, collection, index size, and collection size to a local CSV file

Install

Run this command, please choose pip or pip3

pip3 install mostats
pip install mostats

How to use

Please check on the guide below:

usage: getCluster.py [-h] [-u URL] [-c CSV] [-n NAME]

Get the MongoDB database statistic to a local CSV file

options:
  -h, --help            show this help message and exit
  -u URL, --url URL     MongoDB cluster URL, default is "mongodb://127.0.0.1". Example:
                        mongodb+srv://<<username>>:<<password>>@cluster.zqqqy.mongodb.net/?retryWrites=true&w=majority
  -c CSV, --csv CSV     CSV filename, default "cluster-data.csv"
  -n NAME, --name NAME  Cluster name, default value first subdomain example: mongodb+srv://clustername.cl0.mongodb.net will be clustername

Example

For MongoDB Atlas please leave the cluster name empty

mostats -u "mongodb+srv://username:password@cluster0.cluster.mongodb.net/?retryWrites=true&w=majority" -c "cluster-info.csv"

Specify custom cluster name for other MongoDB installation

mostats -u "mongodb+srv://username:password@cluster0.cluster.mongodb.net/?retryWrites=true&w=majority" -c "cluster-info.csv"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

mostats-1.0.3-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file mostats-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: mostats-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 15.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for mostats-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 90d11152fb6703f9ace1f8d7989d96c7508ab6e790225429f914ed3c4010cd81
MD5 6601c0a6dc306acdb5ccc366cd66cb14
BLAKE2b-256 1d5883c95ef2cc41a26f0d447f1e540333b25865a4842537febcaf6c39ff509e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page