Login or register    

Hacking on heka log router

download and install go

wget http://go.googlecode.com/files/go1.2.1.linux-amd64.tar.gz

sudo tar -C /usr/local -xzf go1.2.1.linux-amd64.tar.gz

# this is a hack, use soft links or install in the proper location the first time
sudo mv /usr/local/go/* /usr/bin

Build heka

source build.sh

Test heka

So first you need to make sure you have all the dependencies needed to build heka, the best way to find out is to Build heka.

If that works, make heka/build your current working directory and run either:

make test



to test only the code you are changing run:h

# ctest -R [desired-test]
ctest -R tcp

how I resolved regexp default delimiter defect

This patch resolves a defect that causes the regexp default config delimiter to always be clobbered, now we check before we step.

modified: plugins/tcp/tcp_input.go

Here is the manual test case:

address = ""
parser_type = "regexp"

type = "LogOutput"
message_matcher = "TRUE"
payload_only = true

and I used netcat to test:

nc 5565
hello, heka!

I tried to run the unit tests in the code base with go test but I got errors about missing libraries ...

Ok, I learned from reviewing TravisCI output that I needed sudo apt-get install protobuf-compiler in order to run go test.

heka and ssl

heka supports SSL, for testing I used self signed certs, it looked something like this:

On the outbound TCP hekad "client" configuration I added the following:

use_tls = true

    insecure_skip_verify = true

On the inbound TCP hekad "server" configuration I added the following:

use_tls = true

    cert_file = "/etc/ssl/certs/ssl-cert-snakeoil.pem"
    key_file = "/etc/ssl/private/ssl-cert-snakeoil.key"

Notice that we are skipping crt verification which is susceptible to man-in-the-middle-attacks. Also we are not using client verification. Heka supports both.


Leave a comment

Please login or register to leave a comment!