Skip to content

Parses MongoDB getMongoData.js output and produces an HTML report and/or inserts a summary into MongoDB, exports to Excel

License

Notifications You must be signed in to change notification settings

mhelmstetter/getMongoData-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

getMongoData-parser

Parses MongoDB getMongoData.js output and produces an HTML report and/or inserts a summary into MongoDB, exports to Excel.

Quickstart

  1. Download the getMongoData script. It is recommended to use the version from this gist. Execute the script using the mongo shell, note that the script does not currently work using the newer mongosh shell. Instructions for executing are at the top of the getMongoData js file.

  2. Download the jar file:

wget https://github.com/mhelmstetter/getMongoData-parser/blob/master/bin/getMongoDataParser.jar?raw=true
  1. Create an alias, run the following and/or add it to your .zprofile or .bashprofile (update the path to the correct location!)
alias getmongodata="java -jar ${HOME}/git/getMongoData-parser/bin/getMongoDataParser.jar"
  1. Run it!
getmongodata -f getMongoData.log

or

java -jar getMongoDataParser.jar -f getMongoData.log

the output will be written to a file of the same name with a html extension, e.g. getMongoData.html for the above example.

Database output

getmongodata -f getMongoData.log -c mongodb://localhost:27017/stats

The output will be written to the database provided in the -c argument. (Note: the database name must be provided in the connection string; adjust connection string as needed!). This will create two collections: collStatsand shardStats in the database.

About

Parses MongoDB getMongoData.js output and produces an HTML report and/or inserts a summary into MongoDB, exports to Excel

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published