Skip to main content

Get the MongoDB database statistic to a local CSV file

Project description

Mostats 📊

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: mostats-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 15.8 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c6be536d4d5550c1f89e109a170c0162b0381f3d1578ff4117aabccb92234418
MD5 1164babd0e502d124c407516a228c224
BLAKE2b-256 921a04a07b1d7abaaf75801084234f6e5daf078221457ff63e16b00f2340cab4

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