Public Repository

Last pushed: 2 years ago
Short Description
A docker container with redis, logstash, elasticsearch, kibana
Full Description

How to run the container?

docker run -it --rm -p 9200:9200 -p 80:5601 -p 6379:6379 hex0cter/relk

How to login the container with a different shell?

docker ps
docker exec -i -t <CONTAINER ID>  bash

(Below examples assume your docker container is running at 192.168.59.103, on OS X you can get it by running boot2docker ip)

How to browse elasticsearch from a browser?

How to test redis inside of container:

[root@dee1dff5e257 /]# cd /opt/redis-3.0.2/src/
[root@dee1dff5e257 src]# ./redis-cli
(integer) 1
127.0.0.1:6379> rpush logstash "{1}"
(integer) 1
127.0.0.1:6379> rpush logstash "{2}"
(integer) 1
127.0.0.1:6379> rpush logstash "{3}"
(integer) 1
127.0.0.1:6379> rpush logstash "{4}"

How to test redis from outside of container?

$ telnet 192.168.59.103 6379
Trying 192.168.59.103...
Connected to 192.168.59.103.
Escape character is '^]'.
set a 1
+OK
get a
$1

How to send data from Ruby?

require 'redis'
@redis = Redis.new(host: 192.168.59.103, port: 6379, db: 0)
@redis.rpush 'logstash', data.to_json
Docker Pull Command
Owner
hex0cter