{"id":19686337,"url":"https://github.com/closeio/mongosniff-info","last_synced_at":"2025-09-12T10:44:27.126Z","repository":{"id":66129472,"uuid":"54422496","full_name":"closeio/mongosniff-info","owner":"closeio","description":"Analyze your MongoDB traffic","archived":false,"fork":false,"pushed_at":"2016-03-22T00:34:38.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-01-10T07:19:20.839Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/closeio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-21T21:03:24.000Z","updated_at":"2016-03-22T01:08:04.000Z","dependencies_parsed_at":"2023-02-22T20:30:44.621Z","dependency_job_id":null,"html_url":"https://github.com/closeio/mongosniff-info","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/closeio%2Fmongosniff-info","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/closeio%2Fmongosniff-info/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/closeio%2Fmongosniff-info/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/closeio%2Fmongosniff-info/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/closeio","download_url":"https://codeload.github.com/closeio/mongosniff-info/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240993950,"owners_count":19890419,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T18:27:33.923Z","updated_at":"2025-02-27T07:43:28.057Z","avatar_url":"https://github.com/closeio.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"#### Analyze your MongoDB traffic\n\nThis script analyzes the output of a [mongosniff](https://docs.mongodb.org/manual/reference/program/mongosniff/)\ncommand, giving you an insight into your MongoDB traffic. You can see which queries retrieve the most data\nfrom your database or look at aggregate per-collection statistics. Here's what you should do to analyze\nyour production traffic:\n\n1. On the MongoDB server: `sudo tcpdump -i eth0 -w dump.pcap 'port 27017'`\n   (caution: this will cause a CPU/disk IO spike, so make sure your machine\n   can handle it).\n2. Download the pcap file to your local machine (e.g. via scp).\n3. `mongosniff --source FILE dump.pcap \u003e sniffed.log`\n4. Run this script, e.g.:\n    * `python sniff_into sniffed.log sort`\n    * `python sniff_into sniffed.log aggregate`\n\n\n#### When is this script useful?\n\nThis script is useful when your monitoring tools indicate that there's a lot\nof data sent/received by your MongoDB server, but you're not certain which\nqueries are responsible for it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloseio%2Fmongosniff-info","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloseio%2Fmongosniff-info","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloseio%2Fmongosniff-info/lists"}