|
|
| .. code-block:: bash | | .. code-block:: bash |
| | | |
| n | use_tls = true | n | use_tls = true |
| | | |
| t | [tcp:9612.tls] | t | [tcp:9612.tls] |
| cert_file = "self-signed.crt" | | cert_file = "self-signed.crt" |
| key_file = "self-signed.key" | | key_file = "self-signed.key" |
| | | |
| Notice that we are skipping crt verification which is susceptible to man-in-the- | | 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. | | middle-attacks. Also we are not using client verification. Heka supports both. |
| | | |
|
|
| | | |
| | | |
| n | | n | heka and ssl |
| | | ================== |
| | | |
| t | | t | heka supports SSL, for testing I used self signed certs, it looked something lik |
| | | e this: |
| | | |
| | | edit openssl.conf and add the following entry to the **[ v3_ca ]** substituting |
| | | the IP address as needed: |
| | | |
| | | |
| | | |
| | | .. code-block:: bash |
| | | |
| | | sudo vim /etc/ssl/openssl.cnf |
| | | |
| | | .. code-block:: bash |
| | | |
| | | subjectAltName = IP:192.168.1.62 |
| | | |
| | | Produce self-signed crt and key: |
| | | |
| | | .. code-block:: bash |
| | | |
| | | sudo openssl req -x509 -batch -nodes -newkey rsa:2048 -keyout self-signed.key - |
| | | out self-signed.crt |
| | | |
| | | On the outbound TCP hekad "client" configuration I added the following: |
| | | |
| | | .. code-block:: bash |
| | | |
| | | use_tls = true |
| | | |
| | | [tcp:9612.tls] |
| | | insecure_skip_verify = true |
| | | |
| | | On the inbound TCP hekad "server" configuration I added the following: |
| | | |
| | | .. code-block:: bash |
| | | |
| | | use_tls = true |
| | | |
| | | [tcp:9612.tls] |
| | | cert_file = "self-signed.crt" |
| | | key_file = "self-signed.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. |
| | | |
| | | |
|
|
| t | Heka build environment | t | Hacking on heka log router |
| ############################ | | ############################ |
| | | |
|
|
| source build.sh | | source build.sh |
| | | |
| n | how to run tests | n | |
| | | Test heka |
| ===================== | | ===================== |
| | | |
| # ctest -R [desired-test] | | # ctest -R [desired-test] |
| ctest -R tcp | | ctest -R tcp |
| t | | t | |
| | | |
| | | |
| | | |
|
|
| source build.sh | | source build.sh |
| | | |
| n | | n | how to run tests |
| | | ===================== |
| | | |
| | | So first you need to make sure you have all the dependencies needed to build hek |
| | | a, the best way to find out is to `Build heka`_. |
| | | |
| | | If that works, make heka/build your current working directory and run either: |
| | | |
| | | .. code-block:: bash |
| | | |
| | | make test |
| | | |
| | | or: |
| | | |
| | | .. code-block:: bash |
| | | |
| | | ctest |
| | | |
| | | to test only the code you are changing run:h |
| | | |
| | | .. code-block:: bash |
| | | |
| | | # ctest -R [desired-test] |
| | | ctest -R tcp |
| | | |
| | | |
| how I resolved regexp default delimiter defect | | how I resolved regexp default delimiter defect |
| n | -------------------------------------------------------- | n | ====================================================== |
| | | |
| This patch resolves a defect that causes the regexp default | | This patch resolves a defect that causes the regexp default |
| | | |
| | | |
| n | how to run tests | n | |
| ===================== | | |
| | | |
| t | So first you need to make sure you have all the dependencies needed to build hek | t | |
| a, the best way to find out is to `Build heka`_. | | |
| | | |
| If that works, make heka/build your current working directory and run either: | | |
| | | |
| .. code-block:: bash | | |
| | | |
| make test | | |
| | | |
| or: | | |
| | | |
| .. code-block:: bash | | |
| | | |
| ctest | | |
| | | |
| to test only the code you are changing run:h | | |
| | | |
| .. code-block:: bash | | |
| | | |
| # ctest -R [desired-test] | | |
| ctest -R tcp | | |
| | | |
|
|
| So first you need to make sure you have all the dependencies needed to build hek | | So first you need to make sure you have all the dependencies needed to build hek |
| a, the best way to find out is to `Build heka`_. | | a, the best way to find out is to `Build heka`_. |
| | | |
| n | If that works, make heka/build your current working directory and run either | n | If that works, make heka/build your current working directory and run either: |
| | | |
| .. code-block:: bash | | .. code-block:: bash |
| make test | | make test |
| | | |
| n | or | n | or: |
| | | |
| .. code-block:: bash | | .. code-block:: bash |
| ctest | | ctest |
| | | |
| n | to test only the code you are changing run | n | to test only the code you are changing run:h |
| | | |
| .. code-block:: bash | | .. code-block:: bash |
| | | |
| t | ctest -R [desired-test] | t | # ctest -R [desired-test] |
| | | ctest -R tcp |
| | | |
|
|
| So first you need to make sure you have all the dependencies needed to build hek | | So first you need to make sure you have all the dependencies needed to build hek |
| a, the best way to find out is to `Build heka`_. | | a, the best way to find out is to `Build heka`_. |
| | | |
| n | If that works, make heka/build your current working directory and run either:: | n | If that works, make heka/build your current working directory and run either |
| | | |
| | | .. code-block:: bash |
| | | |
| make test | | make test |
| | | |
| n | or:: | n | or |
| | | |
| | | .. code-block:: bash |
| | | |
| ctest | | ctest |
| | | |
| t | to test only the code you are changing run:: | t | to test only the code you are changing run |
| | | |
| | | .. code-block:: bash |
| | | |
| ctest -R [desired-test] | | ctest -R [desired-test] |
|
|
| | | |
| Ok, I learned from reviewing TravisCI output that I needed `sudo apt-get install | | Ok, I learned from reviewing TravisCI output that I needed `sudo apt-get install |
| protobuf-compiler` in order to run `go test`. | | protobuf-compiler` in order to run `go test`. |
| t | | t | |
| | | |
| | | how to run tests |
| | | ===================== |
| | | |
| | | So first you need to make sure you have all the dependencies needed to build hek |
| | | a, 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 |
| | | |
| | | or:: |
| | | |
| | | ctest |
| | | |
| | | to test only the code you are changing run:: |
| | | |
| | | ctest -R [desired-test] |
| | | |
|
|
| | | |
| source build.sh | | source build.sh |
| t | | t | |
| | | 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: |
| | | |
| | | .. code-block:: toml |
| | | |
| | | [TcpInput] |
| | | address = "127.0.0.1:5565" |
| | | parser_type = "regexp" |
| | | |
| | | [STDOUT] |
| | | type = "LogOutput" |
| | | message_matcher = "TRUE" |
| | | payload_only = true |
| | | |
| | | and I used netcat to test: |
| | | |
| | | |
| | | .. code-block:: bash |
| | | |
| | | nc 127.0.0.1 5565 |
| | | hello, heka! |
| | | |
| | | I tried to run the unit tests in the code base with `go test` but I got errors a |
| | | bout missing libraries ... |
| | | |
| | | Ok, I learned from reviewing TravisCI output that I needed `sudo apt-get install |
| | | protobuf-compiler` in order to run `go test`. |
|
|
| sudo tar -C /usr/local -xzf go1.2.1.linux-amd64.tar.gz | | sudo tar -C /usr/local -xzf go1.2.1.linux-amd64.tar.gz |
| | | |
| t | export PATH=$PATH:/usr/local/go/bin | t | # this is a hack, use soft links or install in the proper location the first ti |
| | | me |
| | | sudo mv /usr/local/go/* /usr/bin |
| | | |
| | | |
| | | |
|
|
| f | Heka build environment | f | Heka build environment |
| ############################ | | ############################ |
| n | | n | |
| | | download and install go |
| | | |
| .. code-block:: bash | | .. code-block:: bash |
| | | |
| | | |
| t | | t | |
| Build heka | | Build heka |
| ============== | | ============== |
|
|
| t | | t | Heka build environment |
| | | ############################ |
| | | |
| | | .. code-block:: bash |
| | | |
| | | 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 |
| | | |
| | | export PATH=$PATH:/usr/local/go/bin |
| | | |
| | | |
| | | Build heka |
| | | ============== |
| | | |
| | | .. code-block:: bash |
| | | |
| | | source build.sh |