{"_id":"55e534d8f11ba80d003237b2","user":"55e4cefa3325e60d007fbec9","githubsync":"","project":"55e4cf1640cda60d003bad4d","version":{"_id":"55e534d7f11ba80d003237af","__v":1,"project":"55e4cf1640cda60d003bad4d","createdAt":"2015-09-01T05:17:11.730Z","releaseDate":"2015-09-01T05:17:11.730Z","categories":["55e534d8f11ba80d003237b0"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.1.0","version":"1.1"},"__v":0,"category":{"_id":"55e534d8f11ba80d003237b0","pages":["55e534d8f11ba80d003237b1","55e534d8f11ba80d003237b2"],"project":"55e4cf1640cda60d003bad4d","version":"55e534d7f11ba80d003237af","__v":1,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-08-31T22:03:04.213Z","from_sync":false,"order":0,"slug":"documentation","title":"Documentation"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-09-01T04:10:33.430Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"Redis Sniffer binds to a network interface and analyzes the traffic that is crossing the interface on the specified port.  \n\nAt the most basic level using Redis Sniffer is extremely simple.  \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"redis-sniffer -i <interface> -p <port>\\n# example\\nredis-sniffer -i eth0 -p 6379\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\nThis will cause all redis events going across eth0 on port 6379 to be logged.  When used without the '--out' flag, Redis Sniffer will log to the current working directory.  Below are some examples of other options that can be used and their affect.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"# log all redis traffic on port 6379 crossing bond0 interface and have the logs written to the /var/log/redis-sniffer folder\\nredis-sniffer -i bond0 -p 6379 --out /var/log/redis-sniffer\\n\\n# log only select redis commands; -f allows a comma separated list of redis commands to log.  when using the -f flag, each command specified will be logged to a seperate file\\nredis-sniffer -i bond0 -p 6379 --out /var/log/redis-sniffer -f select\\n\\n# other options\\n-l [full,event,debug] - the level of logging, defaults to full\\n-el, --event-log - The name of the file that redis events are logged to\\n-fl, --full-log - The name of the file that all traffic is logged to\\n--append - a suffix to append to the file names from using filters\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]","excerpt":"You've got it installed, but how to use it.","slug":"usage","type":"basic","title":"Usage"}

Usage

You've got it installed, but how to use it.

Redis Sniffer binds to a network interface and analyzes the traffic that is crossing the interface on the specified port. At the most basic level using Redis Sniffer is extremely simple. [block:code] { "codes": [ { "code": "redis-sniffer -i <interface> -p <port>\n# example\nredis-sniffer -i eth0 -p 6379", "language": "shell" } ] } [/block] This will cause all redis events going across eth0 on port 6379 to be logged. When used without the '--out' flag, Redis Sniffer will log to the current working directory. Below are some examples of other options that can be used and their affect. [block:code] { "codes": [ { "code": "# log all redis traffic on port 6379 crossing bond0 interface and have the logs written to the /var/log/redis-sniffer folder\nredis-sniffer -i bond0 -p 6379 --out /var/log/redis-sniffer\n\n# log only select redis commands; -f allows a comma separated list of redis commands to log. when using the -f flag, each command specified will be logged to a seperate file\nredis-sniffer -i bond0 -p 6379 --out /var/log/redis-sniffer -f select\n\n# other options\n-l [full,event,debug] - the level of logging, defaults to full\n-el, --event-log - The name of the file that redis events are logged to\n-fl, --full-log - The name of the file that all traffic is logged to\n--append - a suffix to append to the file names from using filters", "language": "shell" } ] } [/block]