Skip to content

Instantly share code, notes, and snippets.

@rafaelrosafu
Last active December 17, 2015 19:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rafaelrosafu/5658550 to your computer and use it in GitHub Desktop.
Save rafaelrosafu/5658550 to your computer and use it in GitHub Desktop.
Compile and Install Heka on Centos 6.4

More info on http://hekad.readthedocs.org/en/latest/installing.html

Build and test hekad

yum install git gcc patch python-devel
rpm -ihv http://pkgs.repoforge.org/cmake/cmake-2.8.8-1.el6.rfx.x86_64.rpm

git clone git@github.com:mozilla-services/heka-build.git
cd heka-build
make
make test

After that you should have a hekad, go and mockgen files inside heka-build/bin

Use flood to test hekad

cd heka-build
make bin/flood

After that you should have a flood file inside heka-build/bin. Create the following files in the same directory:

sample_stdout_hekad.toml

[TcpInput]
address = ":5565"

[debug]
type = "LogOutput"
message_matcher = "TRUE"

The message_matcher = "TRUE" tells hekad to match any message, otherwise it will ignore everything.

sample_flood.toml

[default]
ip_address          = "127.0.0.1:5565"
sender              = "tcp"
pprof_file          = ""
encoder             = "protobuf"
num_messages        = 10
corrupt_percentage  = 0.0001
signed_percentage   = 0.00011
variable_size_messages = true

Adjust IP address as needed, in my test case I had 2 machines to test, so the IP on sample_flood.toml was different. On the receiver machine run:

./hekad -config=sample_stdout_hekad.toml

On the log sender machine, which can be the same, run:

./flood -config=sample_flood.toml

You should see some log messages on your console. Flood doesn't generate any payload, so all you see is mostly garbage, but at least you'll know things are working. If you want to see more messages, change the num_messages on the flood.toml to a good number or change it to 0 to generate a random high number of messages.

On my test I tried to use the LogOutput but I got a bizarre error, later I'll try to use it on a Ubuntu machine to see if the problem is the older version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment