diff --git a/plugins/mongodb/index.py b/plugins/mongodb/index.py index 8a068421c..7d5bac2ab 100755 --- a/plugins/mongodb/index.py +++ b/plugins/mongodb/index.py @@ -732,7 +732,15 @@ def getDbInfo(): db_name = args['name'] db = client[db_name] - result = db.command("dbStats") + result = {} + t = db.command("dbStats") + # print(result) + result['collections'] = t['collections'] + result['avgObjSize'] = t['avgObjSize'] + result['dataSize'] = t['dataSize'] + result['storageSize'] = t['storageSize'] + result['indexSize'] = t['indexSize'] + result["collection_list"] = [] for collection_name in db.list_collection_names(): collection = db.command("collStats", collection_name)