Skip to content

Instantly share code, notes, and snippets.

@cookie-ag
Last active September 7, 2017 04:31
Show Gist options
  • Save cookie-ag/9840eaee4a37a73722eda952470e816d to your computer and use it in GitHub Desktop.
Save cookie-ag/9840eaee4a37a73722eda952470e816d to your computer and use it in GitHub Desktop.
Query logging database (MongoDB)
db.getCollection('Logging').count({"status":{$eq: 200}}) //Equal to 200
db.getCollection('Logging').count({"status":{$gt: 399}}) //Greater than to 399, HTTP Errors
db.getCollection('Logging').count({"status":{$lt: 399}}) //Less than 399, HTTP Success
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment