Metadata-Version: 2.1
Name: mostats
Version: 1.0.1
Summary: Get the MongoDB database statistic to a local CSV file
Author: Hendri Tjipto
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: Unix
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pymongo
Requires-Dist: pandas
Requires-Dist: argparse

# 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

```terminal
pip3 install mostats
pip install mostats
```

#### How to use

Please check on the guide below:

```terminal
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

```python
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

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