{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","params":[],"results":{"codes":[]},"settings":""},"next":{"description":"","pages":[]},"title":"Usage","type":"basic","slug":"usage","excerpt":"You've got it installed, but how to use it.","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]","updates":[],"order":1,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"55e534d8f11ba80d003237b2","user":"55e4cefa3325e60d007fbec9","githubsync":"","project":"55e4cf1640cda60d003bad4d","version":{"version":"1.1","version_clean":"1.1.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["55e534d8f11ba80d003237b0"],"_id":"55e534d7f11ba80d003237af","__v":1,"createdAt":"2015-09-01T05:17:11.730Z","project":"55e4cf1640cda60d003bad4d","releaseDate":"2015-09-01T05:17:11.730Z"},"__v":0,"category":{"sync":{"isSync":false,"url":""},"pages":["55e534d8f11ba80d003237b1","55e534d8f11ba80d003237b2"],"title":"Documentation","slug":"documentation","order":0,"from_sync":false,"reference":false,"_id":"55e534d8f11ba80d003237b0","createdAt":"2015-08-31T22:03:04.213Z","project":"55e4cf1640cda60d003bad4d","version":"55e534d7f11ba80d003237af","__v":1},"createdAt":"2015-09-01T04:10:33.430Z"}

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]