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.1-py3-none-any.whl (15.7 kB view hashes)

Uploaded Python 3

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