building-heka
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/binBuild heka
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:
or:
to test only the code you are changing run:h
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:
[TcpInput]
address = "127.0.0.1:5565"
parser_type = "regexp"
[STDOUT]
type = "LogOutput"
message_matcher = "TRUE"
payload_only = trueand I used netcat to test:
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:
On the inbound TCP hekad "server" configuration I added the following:
use_tls = true
[tcp:9612.tls]
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.
Remarkbox
Comments