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.4-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mostats-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 16.4 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 cf6ad258b6f62362e68df985f3365d3bc513301d3623f7c198da4cc9cba702f3
MD5 7a0f8dab375fa1e8f20a072b8d540d49
BLAKE2b-256 b2d2a1a71c7f22bdfbe6fa2bf69ca31203d84e6a7f4ef9c2c84e862b5b589f22

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