Skip to content

Instantly share code, notes, and snippets.

@cdimascio
Last active July 19, 2018 16:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cdimascio/3f56b143401a4f9d7d3c60fcc5d19a87 to your computer and use it in GitHub Desktop.
Save cdimascio/3f56b143401a4f9d7d3c60fcc5d19a87 to your computer and use it in GitHub Desktop.
Count and sort connections to MongoDB aggregated by IP address
# Replace mongodb.log with your mongodb log
cat mongodb.log | grep "syslog" | cut -d " " -f 6 | sort | uniq -c | sort -rn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment