Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Beaver -> Redis -> Logstash
[beaver]
transport: redis
redis_url: redis://localhost:6379/0
redis_namespace: beaver
logstash_version: 1
[/tmp/test.log]
format: json
multiline_regex_before: ^(?!.*Started)
type: multiline_test
[/tmp/json.log]
format: raw
type: json
[beaver]
transport: tcp
tcp_host: localhost
tcp_port: 9999
logstash_version: 1
[/tmp/test.log]
format: json
multiline_regex_before: ^(?!.*Started)
type: multiline_test
[/tmp/json.log]
format: raw
type: json

Getting beaver talking to logstash w/multiline rollups over TCP & Redis.

Multi-line test

In terminal 1:

beaver -c beaver-tcp.conf

In terminal 2:

logstash -e "input { tcp { port => 9999 } } output { stdout {} }"

In terminal 3:

> echo "Started something" >> /tmp/test.log && \
  echo " while doing something else" >> /tmp/test.log

Json test

In terminal 3:

> echo '{"a": 1}' >> /tmp/json.log

Redis test

In terminal 1:

beaver -c beaver-redis.conf

In terminal 2:

logstash -e "input { redis { data_type => 'list' key => 'beaver' } } output { stdout {} }"

In terminal 3:

> echo "Started something" >> /tmp/test.log && \
  echo " while doing something else" >> /tmp/test.log
> echo '{"a": 1}' >> /tmp/json.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment